Methods for determining the deflection angle of a quantum rotating door, error mitigation methods and devices
By determining the theoretical and actual Hamiltonian expectation distribution of the quantum rotating gate, and using elliptic fitting to calculate the deflection angle, the actual rotation angle of the quantum rotating gate is corrected, thus solving the error problem caused by the angle deflection of the quantum rotating gate and improving the accuracy of quantum computing.
Patent Information
- Application Number
- CN202311642809.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-11-29
AI Technical Summary
The rotation angle deflection of the quantum rotating gate when it runs on a quantum chip causes quantum error, which is difficult to effectively determine and mitigate with existing technologies.
By determining the distribution patterns of the theoretical and actual Hamiltonian expectations for multiple rotation angles, the deflection angle is calculated using an ellipse fitting method to correct the actual rotation angle of the quantum rotating gate and reduce errors.
This effectively reduces the impact of the angle deflection of the quantum rotation gate on the quantum chip on the final result, alleviates quantum errors, and improves the accuracy of quantum computing.
Smart Images

Figure CN117474111B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of quantum error mitigation, and in particular to a method for determining the deflection angle of a quantum rotating gate, an error mitigation method, and an apparatus. Background Technology
[0002] Quantum computers, with their immense computing power, offer new possibilities for overcoming the current limitations of computing. This is reflected in two aspects: firstly, quantum computers guarantee exponential or polynomial speedups over classical computers on specific problems; secondly, the manipulation techniques for quantum systems are becoming increasingly sophisticated, enabling high-fidelity gate implementation and reasonable coherence times for multi-qubit devices. A series of calculations based on recent quantum devices demonstrate the enormous potential and application value of quantum computing in the future, making it the most likely path to breaking through the limits of classical computing power.
[0003] On the path to mature quantum computing, quantum noise and errors have become the biggest obstacles to achieving large-scale quantum computing. This is reflected in the fact that quantum systems inevitably interact with their environment, so the quantum states characterized by quantum devices are affected by various noise sources. These influences accumulate over time, causing the quantum states to deviate completely from their ideal state, rendering the computational results meaningless. Quantum error mitigation can translate advancements in quantum hardware into improvements in quantum information processing. Due to the limited coherence time and noise inherent in quantum hardware, the most important characteristic of quantum error mitigation is minimizing the bias caused by noise in the expected values of noisy hardware.
[0004] When a quantum rotation gate operates within a quantum chip, its rotation angle causes a deflection, leading to a deviation from the ideal result and introducing quantum error. To mitigate this error, it's crucial to determine the desired rotation angle and the actual rotation angle during operation on the quantum chip. Therefore, accurately determining the deflection angle of the quantum rotation gate is a pressing issue that needs to be addressed. Summary of the Invention
[0005] The purpose of this application is to provide a method for determining the deflection angle of a quantum rotating gate, an error mitigation method, and a device. The deflection angle is determined by the distribution law of the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian, thereby mitigating quantum errors.
[0006] One embodiment of this application provides a method for determining the deflection angle of a quantum rotating gate, the method comprising:
[0007] Determine multiple rotation angles for a single quantum rotating gate;
[0008] Determine the theoretical Hamiltonian expectation value and the actual Hamiltonian expectation value corresponding to each of the said rotation angles of the quantum rotating gate, wherein the actual Hamiltonian expectation value is the expectation value measured by running a quantum circuit including the quantum rotating gate of the said rotation angle on a quantum chip;
[0009] By utilizing the distribution pattern formed by the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian, the deflection angle of the quantum rotating gate on the quantum chip is determined.
[0010] Optionally, the plurality of rotation angles are obtained by scattering points within an angle range centered on a specific rotation angle.
[0011] Optionally, the plurality of rotation angles are obtained by uniformly sampling from the rotation angle range of the quantum rotation gate.
[0012] Optionally, obtaining the deflection angle of the quantum rotating gate on the quantum chip using the distribution law formed by the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian includes:
[0013] By taking the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian corresponding to a rotation angle as one set of data, multiple sets of data are obtained.
[0014] Ellipse fitting is performed on the multiple sets of data to determine the feature parameters of the fitted ellipse;
[0015] The deflection angle of the quantum rotating gate on the quantum chip is calculated using the aforementioned characteristic parameters.
[0016] Optionally, the feature parameters include the length of the major axis and the length of the minor axis of the fitted ellipse;
[0017] The calculation of the deflection angle of the quantum rotating gate on the quantum chip using the characteristic parameters includes:
[0018] The deflection angle of the quantum rotating gate on the quantum chip is calculated using the ratio of the major axis length to the minor axis length.
[0019] Optionally, the deflection angle is calculated using the formula δ = 2arctan(b / a), where δ is the deflection angle, a is the length of the major axis of the ellipse, and b is the length of the minor axis of the ellipse.
[0020] Optionally, the parametric equation of the ellipse is:
[0021]
[0022] Where x is the expected value of the theoretical Hamiltonian, x = L(θ) = c + b cos(θ + a), y is the expected value of the actual Hamiltonian, y = L(θ + δ) = c + b cos(θ + a + δ), c is a constant, L(θ) is the loss function value of the quantum rotating gate at the corresponding rotation angle, and L(θ + δ) are the loss function values of the quantum rotating gate after the rotation angle θ is deflected by δ.
[0023] Optionally, the method further includes:
[0024] By utilizing the relationship between the first derivatives of the loss function of the quantum rotating gate at different angles, a first relationship is determined, wherein the first relationship is the relationship between the loss function of the quantum rotating gate at one angle and the loss function at a specified angle, wherein the specified angle is the sum of the angle and π;
[0025] Using the first and second relationships, the relationship between the loss function and the length of the major axis, the length of the minor axis, and a constant is determined, wherein the second relationship is the relationship between the second derivative of the loss function of the quantum rotating gate at a certain angle and the loss function at that angle;
[0026] The parametric equations are constructed based on the relationship between the determined loss function and the major axis length, the minor axis length, and constants.
[0027] Another embodiment of this application provides an error mitigation method, the method comprising:
[0028] Using the method provided in any of the above embodiments, the deflection angle of the quantum rotating gate on the quantum chip is determined;
[0029] Based on the deflection angle and the obtained rotation angle of the quantum rotating gate, the target rotation angle for operation on the quantum chip is determined;
[0030] The quantum rotation gate operates on the quantum chip at the target rotation angle.
[0031] Another embodiment of this application provides a device for determining the deflection angle of a quantum rotating gate, the device comprising:
[0032] The first determining module is used to determine multiple rotation angles for a quantum rotating gate;
[0033] The second determining module is used to determine the theoretical Hamiltonian expectation value and the actual Hamiltonian expectation value corresponding to the quantum rotating gate for each rotation angle, wherein the actual Hamiltonian expectation value is the expectation value measured by running a quantum circuit including the quantum rotating gate with the rotation angle on a quantum chip.
[0034] The third determining module is used to determine the deflection angle of the quantum rotating gate on the quantum chip by utilizing the distribution law formed by the expected value of the theoretical Hamiltonian and the expected value of the real Hamiltonian.
[0035] Another embodiment of this application provides an error mitigation device, the device comprising:
[0036] The fourth determining module is used to determine the deflection angle of the quantum rotating gate on the quantum chip using the method provided in any of the above embodiments;
[0037] The fifth determining module is used to determine the target rotation angle for operation on the quantum chip based on the deflection angle and the obtained rotation angle of the quantum rotating gate;
[0038] The operating module is used to run the quantum rotating gate on the quantum chip at the target rotation angle.
[0039] One embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to implement, when running, the method for determining the deflection angle of the quantum rotating gate or the error mitigation method described in any of the preceding claims.
[0040] One embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the method for determining the deflection angle of a quantum rotating gate or the error mitigation method described in any of the preceding claims.
[0041] Compared with existing technologies, this application first determines multiple rotation angles for a quantum rotating gate; then, it determines the theoretical and actual expected values of the Hamiltonian corresponding to each rotation angle; and finally, it uses the distribution pattern formed by the theoretical and actual expected values of the Hamiltonian to determine the deflection angle of the quantum rotating gate on the quantum chip. By using the distribution pattern of the actual and theoretical expected values of the Hamiltonian at different rotation angles, the deflection angle of the quantum rotating gate on the quantum chip is determined. This allows for the determination of the actual rotation angle during operation on the quantum chip, reducing the impact of angle deflection on the final result and thus mitigating quantum errors. Attached Figure Description
[0042] Figure 1 This is a network block diagram of a quantum rotating gate deflection angle determination system and an error mitigation system provided in an embodiment of this application;
[0043] Figure 2 A flowchart illustrating a method for determining the deflection angle of a quantum rotating gate, provided in an embodiment of this application;
[0044] Figure 3 A scatter plot showing the expected value of the actual Hamiltonian and the expected value of the theoretical Hamiltonian provided for embodiments of this application;
[0045] Figure 4 A scatter plot showing the fitted expected value of the real Hamiltonian and the expected value of the theoretical Hamiltonian, provided for an embodiment of this application.
[0046] Figure 5 A flowchart illustrating an error mitigation method provided in an embodiment of this application;
[0047] Figure 6 A schematic diagram of a device for determining the deflection angle of a quantum rotating door, provided in an embodiment of this application;
[0048] Figure 7 This is a schematic diagram of an error mitigation device provided in an embodiment of this application. Detailed Implementation
[0049] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0050] Figure 1 This is a network block diagram of a quantum rotating door deflection angle determination system and an error mitigation system provided in an embodiment of this application. The quantum rotating door deflection angle determination system or error mitigation system may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, a quantum processing system 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.
[0051] Network 110 is a medium used to provide communication links between various devices and computers connected together within a quantum rotating gate deflection angle determination system or error mitigation system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.
[0052] Server 120 and client 140 are conventional data processing systems that may contain data and applications or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.
[0053] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 162 (application program 173). The application program 162 (application program 173) may be used to implement a quantum algorithm compiled according to the method for determining the deflection angle of a quantum rotating gate or the error mitigation method provided in the embodiments of this application.
[0054] Any data or information stored or generated in the classical processing system 160 (quantum processing system 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.
[0055] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical processing system 160, which is responsible for performing classical calculations and control; and the quantum processing system 170, which is responsible for running quantum programs and thus realizing quantum computing.
[0056] The aforementioned classical processing system 160 and quantum processing system 170 can be integrated into a single device or distributed across two different devices. For example, the first device, including the classical processing system 160, runs a classical computer operating system that provides quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum applications using the quantum application development tools and services on the second device and send the quantum program to the second device, including the quantum processing system 170, via the network services. The second device runs a quantum computer operating system, which parses the code of the quantum program and compiles it into instructions that can be recognized and executed by the quantum computer control system. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.
[0057] In the classic silicon-based processing system 160, the units of the classic processor 161 are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of these computing units in a silicon chip is sufficient; currently, a classic processor contains tens of thousands of computing units. The sufficient number of computing units and the fixed selectable computing logic of the CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.
[0058] Unlike the logic units in the classical processing system 160, the basic computational unit of the quantum processor 171 in the quantum processing system 170 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logic functions. Given the limited number of qubits and the diverse logic functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logic function combinations to achieve computational effects.
[0059] Based on these differences, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit's use) is crucial to improving the computational performance of quantum computers and requires specialized design. The aforementioned design considerations for qubits are technical issues that ordinary computing devices do not need to address.
[0060] See Figure 2 , Figure 2 A flowchart illustrating a method for determining the deflection angle of a quantum rotating gate, provided in an embodiment of this application, may include the following steps:
[0061] S201: Determine multiple rotation angles for a quantum rotating gate.
[0062] In this embodiment, the quantum rotation gate is one of the RX gate, RY gate, and RZ gate. The number of rotation angles can be preset. Specifically, multiple rotation angles are obtained by sampling points within an angle range centered on a target rotation angle. A specific rotation angle can be selected from the rotation angle range of the quantum rotation gate, or it can be the rotation angle of the quantum rotation gate in the quantum circuit. Then, an angle range is determined centered on this specific rotation angle, and points are evenly or randomly scattered within this angle range to obtain multiple rotation angles. The number of scattered points is preset. It should be noted that the specific rotation angle generally does not select the endpoint of the rotation angle range of the quantum rotation gate; it is necessary to ensure that the angle range determined by the specific rotation angle is still within the rotation angle range. The length from the target rotation angle to the angle range can be preset, or different lengths can be set according to different target rotation angles. Multiple rotation angles can also be obtained by evenly sampling within the rotation angle range of the quantum rotation gate. The rotation angle range of the quantum rotation gate is [-π, π], and multiple rotation angles can be obtained by evenly sampling within this range.
[0063] S202: Determine the theoretical Hamiltonian expectation value and the actual Hamiltonian expectation value corresponding to each of the said rotation angles of the quantum rotating gate, wherein the actual Hamiltonian expectation value is the expectation value measured by running a quantum circuit including the quantum rotating gate of the said rotation angle on a quantum chip.
[0064] After determining multiple rotation angles, the operation of a quantum circuit with a quantum rotation gate at each rotation angle is simulated to obtain the theoretical Hamiltonian expectation value corresponding to that rotation angle. The theoretical Hamiltonian expectation value is the expectation value of the Hamiltonian under ideal conditions where the rotation angle has not deflected. The actual Hamiltonian expectation value is the expectation value of the Hamiltonian corresponding to a single quantum rotation gate at a fixed angle offset δ, obtained by measuring the quantum circuit including the quantum rotation gate while running it on a quantum chip. One rotation angle corresponds to one theoretical Hamiltonian expectation value and one actual Hamiltonian expectation value. It should be noted that the quantum rotation gate is a Pauli rotation gate, and its operation on a quantum chip may introduce angle deviations. The obtained theoretical and actual Hamiltonian expectation values are for a single quantum rotation gate, not the expectation values obtained by changing the rotation angles of multiple quantum rotation gates. This reduces the influence of the interaction of multiple quantum rotation gates on the expectation value. In this embodiment of the application, for a quantum circuit, only the rotation angle of one of the quantum rotating gates is changed. When multiple quantum rotating gates are included and / or other types of quantum rotating gates are included, the rotation angles of these quantum rotating gates are not changed.
[0065] S203: Using the distribution law formed by the expected value of the theoretical Hamiltonian and the expected value of the real Hamiltonian, determine the deflection angle of the quantum rotating gate on the quantum chip.
[0066] In this embodiment, multiple theoretical Hamiltonian expectations and multiple real Hamiltonian expectations are obtained, with one theoretical Hamiltonian expectation corresponding to one real Hamiltonian expectation. These theoretical and real Hamiltonian expectations form a certain distribution pattern. By processing and analyzing this distribution pattern, the deflection angle of the quantum rotation gate on the quantum chip can be determined. The determined deflection angle is for a specific type of quantum rotation gate on a specific type of quantum chip. Different types of quantum rotation gates will have corresponding deflection angles due to their inherent properties. Different types of quantum chips will have different deflection angles for the same type of quantum rotation gate due to differences in manufacturing processes and materials used. Currently, quantum chip systems include superconducting, ion trap, silicon-based semiconductor, photonic, atomic, and diamond color centers, etc. For different quantum chip systems, the deflection angle for the same type of quantum rotation gate will be different.
[0067] In some possible embodiments of this application, obtaining the deflection angle of the quantum rotation gate on the quantum chip by utilizing the distribution law formed by the expected value of the theoretical Hamiltonian and the expected value of the real Hamiltonian may include:
[0068] By taking the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian corresponding to a rotation angle as one set of data, multiple sets of data are obtained.
[0069] Ellipse fitting is performed on the multiple sets of data to determine the feature parameters of the fitted ellipse;
[0070] The deflection angle of the quantum rotating gate on the quantum chip is calculated using the aforementioned characteristic parameters.
[0071] The expected theoretical Hamiltonian and the expected actual Hamiltonian corresponding to a rotation angle are used as a set of data. Ellipse fitting is performed on multiple sets of data to obtain a fitted ellipse. Once the fitted ellipse is obtained, its characteristic parameters can be derived, and the deflection angle can be calculated using these parameters. In this embodiment, one of the ellipse fitting methods, such as least squares, gradient descent, and nearest point method, can be used to fit the ellipse, as long as a fitted ellipse is obtained. In practical applications, the expected actual Hamiltonian can be used as the horizontal axis, the expected theoretical Hamiltonian as the vertical axis, and the set of data as points in a coordinate system, as shown below. Figure 3The scatter plot showing the expected values of the actual and theoretical Hamiltonians is used to fit an ellipse to the points in the plot, thus obtaining the deflection angle. The characteristic parameters of the ellipse can include the length of the major axis, the length of the minor axis, the eccentricity, the foci, etc. Using these characteristic parameters and the relationship between the ellipse and the expected values, the deflection angle can be calculated.
[0072] In some possible embodiments of this application, the feature parameters may include the major axis length and minor axis length of the fitted ellipse;
[0073] The step of calculating the deflection angle of the quantum rotating gate on the quantum chip using the characteristic parameters may include:
[0074] The deflection angle of the quantum rotating gate on the quantum chip is calculated using the ratio of the major axis length to the minor axis length.
[0075] Once the ratio of the major axis length to the minor axis length is obtained, this ratio is converted into an angle, which is the deflection angle of the quantum rotating gate on the quantum chip.
[0076] In some possible embodiments of this application, the deflection angle is calculated using the formula δ = 2arctan(b / a), where δ is the deflection angle, a is the length of the major axis of the ellipse, and b is the length of the minor axis of the ellipse.
[0077] For example, in Figure 3 Based on this, the lengths of the major and minor axes of the fitted ellipse can be... Figure 4 As shown, fitting is about describing as accurately as possible. Figure 3 The shape of the midpoint, Figure 3 The points in the curve are distributed around this elliptic curve. Figure 4 The solid line in the middle represents the boundary, major axis, and minor axis of the ellipse. Based on this boundary, the lengths of the major and minor axes can be obtained, and the deflection angle can then be calculated.
[0078] In some possible embodiments of this application, the parametric equation of the ellipse can be:
[0079]
[0080] Where x is the expected value of the theoretical Hamiltonian, x = L(θ) = c + b cos(θ + a), y is the expected value of the actual Hamiltonian, y = L(θ + δ) = c + b cos(θ + a + δ), c is a constant, L(θ) is the loss function value of the quantum rotating gate at the corresponding rotation angle, and L(θ + δ) are the loss function values of the quantum rotating gate after the rotation angle θ is deflected by δ.
[0081] θ represents the rotation angle determined for a quantum rotation gate, and θ+δ represents the rotation angle after a deflection of the rotation angle determined for the quantum rotation gate, where δ is the deflection angle. In this embodiment, L(θ) is the loss function value, defined as the expectation of a certain Hamiltonian. When there is no deflection in the rotation angle, the loss function value is the expected value of the theoretical Hamiltonian; when the rotation angle deflects, the loss function value is the expected value of the true Hamiltonian. c is a constant independent of the rotation angle determined for a quantum rotation gate. The specific value of the constant c is determined during fitting. The major axis length and minor axis length are also values independent of the rotation angle determined for a quantum rotation gate.
[0082] In some possible embodiments of this application, the method further includes:
[0083] By utilizing the relationship between the first derivatives of the loss function of the quantum rotating gate at different angles, a first relationship is determined, wherein the first relationship is the relationship between the loss function of the quantum rotating gate at one angle and the loss function at a specified angle, wherein the specified angle is the sum of the angle and π;
[0084] Using the first and second relationships, the relationship between the loss function and the length of the major axis, the length of the minor axis, and a constant is determined, wherein the second relationship is the relationship between the second derivative of the loss function of the quantum rotating gate at a certain angle and the loss function at that angle;
[0085] The parametric equations are constructed based on the relationship between the determined loss function and the major axis length, the minor axis length, and constants.
[0086] According to the parameter displacement rule, the expectation of a certain Hamiltonian <h>=<φ(θ)|H|φ(θ)>, which is defined as the loss function L(θ). The parametric displacement rule provides the equation corresponding to the Pauli revolving door:
[0087] By applying the parametric displacement rule to the expression, we have:
[0088]
[0089] Then, L(θ+2π)=<φ(θ+2π)|H|φ(θ+2π)>=<-φ(θ)|H|-φ(θ)>=L(θ), so the first derivative of the above equation is 0. Thus, we obtain the first relation: L(θ)+L(θ+π)=2c. Solving for the second derivative L″(θ) of L(θ), we obtain the second relation:
[0090] Using the first and second relations, the corresponding expression is obtained by solving the differential equation L″(θ)=cL(θ):
[0091] L(θ) = c + b cos(θ + a)
[0092] In practical applications, a, b, c are fixed constants determined by the angles on the quantum circuit structure and other quantum logic gates. In the embodiments of this application, the specific values of a, b, c are determined based on the fitting results.
[0093] By setting the parametric equation, x=L(θ)=c+b cos(θ+a), y=L(θ+δ)=c+b cos(θ+a+δ), where,
[0094]
[0095]
[0096] This leads to the parametric equation of the ellipse:
[0097] As can be seen, this application first determines multiple rotation angles for a quantum rotating gate; then, it determines the theoretical and actual expected values of the Hamiltonian corresponding to each rotation angle; and finally, it uses the distribution pattern formed by the theoretical and actual expected values of the Hamiltonian to determine the deflection angle of the quantum rotating gate on the quantum chip. By using the distribution pattern of the actual and theoretical expected values of the Hamiltonian at different rotation angles, the deflection angle of the quantum rotating gate on the quantum chip is determined. This allows for the determination of the actual rotation angle during operation on the quantum chip, reducing the impact of angle deflection on the final result and thus mitigating quantum errors.
[0098] This application proposes an error mitigation method, see [link to relevant documentation] Figure 5 , Figure 5 This is a flowchart illustrating an error mitigation method provided in an embodiment of this application. The method includes:
[0099] S501: Determine the deflection angle of the quantum rotating gate on the quantum chip using the method provided in any of the above embodiments;
[0100] S502: Based on the deflection angle and the obtained rotation angle of the quantum rotating gate, determine the target rotation angle for operation on the quantum chip;
[0101] S503: The quantum rotation gate is operated on the quantum chip at the target rotation angle.
[0102] By utilizing the method for determining the deflection angle of a quantum rotating gate, the deflection angle δ of the quantum rotating gate on a quantum chip can be determined. When a quantum circuit includes this quantum rotating gate to implement an algorithm or solve a problem, and the rotation angle of the quantum rotating gate is θ, then to reduce the deviation of the final result caused by the angular deviation of the quantum rotating gate on the quantum chip, the rotation angle needs to be corrected. The target rotation angle in actual operation on the quantum chip is θ±δ. If a quantum circuit includes multiple quantum rotating gates, the target rotation angle is determined for each quantum rotating gate. For different types of quantum rotating gates, the target rotation angle is determined one by one. Specifically, there is a correspondence between quantum chips and deflection angles; different quantum chips may correspond to different deflection angles. When determining the target rotation angle, the quantum chip to be operated must first be determined, and then the deflection angle is determined according to the correspondence, thus determining the target rotation angle.
[0103] As can be seen, this application first determines the deflection angle of the quantum rotating gate on the quantum chip, and then, based on the deflection angle and the obtained rotation angle of the quantum rotating gate, determines the target rotation angle for operation on the quantum chip; then, the quantum rotating gate is operated on the quantum chip at the target rotation angle. By correcting the rotation angle of the quantum rotating gate on the quantum chip, the impact of angle deviation on the final operating result is reduced, thereby mitigating quantum errors.
[0104] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a device for determining the deflection angle of a quantum rotating gate, provided in an embodiment of this application. Figure 2 Corresponding to the process shown, the apparatus includes:
[0105] The first determining module 601 is used to determine multiple rotation angles for a quantum rotating gate;
[0106] The second determining module 602 is used to determine the theoretical Hamiltonian expectation value and the actual Hamiltonian expectation value corresponding to the quantum rotating gate for each rotation angle, wherein the actual Hamiltonian expectation value is the expectation value measured by running a quantum circuit including the quantum rotating gate with the rotation angle on a quantum chip.
[0107] The third determining module 603 is used to determine the deflection angle of the quantum rotating gate on the quantum chip by utilizing the distribution law formed by the expected value of the theoretical Hamiltonian and the expected value of the real Hamiltonian.
[0108] In some possible implementations of this application, the plurality of rotation angles may be obtained by scattering points within an angle range centered on a target rotation angle.
[0109] In some possible embodiments of this application, the plurality of rotation angles may be uniformly sampled from the rotation angle range of the quantum rotation gate.
[0110] In some possible embodiments of this application, the third determining module 603 may include:
[0111] The acquisition unit is used to take the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian corresponding to a rotation angle as a set of data to obtain multiple sets of data;
[0112] A determining unit is used to perform ellipse fitting on the multiple sets of data and determine the feature parameters of the fitted ellipse.
[0113] A computing unit is used to calculate the deflection angle of the quantum rotating gate on the quantum chip using the characteristic parameters.
[0114] In some possible embodiments of this application, the feature parameters may include the major axis length and minor axis length of the fitted ellipse;
[0115] The computing unit can be specifically used for:
[0116] The deflection angle of the quantum rotating gate on the quantum chip is calculated using the ratio of the major axis length to the minor axis length.
[0117] In some possible embodiments of this application, the deflection angle can be calculated using the formula δ = 2arctan(b / a), where δ is the deflection angle, a is the length of the major axis of the ellipse, and b is the length of the minor axis of the ellipse.
[0118] In some possible embodiments of this application, the parametric equation of the ellipse can be:
[0119]
[0120] Where x is the expected value of the theoretical Hamiltonian, x = L(θ) = c + b cos(θ + a), y is the expected value of the actual Hamiltonian, y = L(θ + δ) = c + b cos(θ + a + δ), c is a constant, L(θ) is the loss function value of the quantum rotating gate at the corresponding rotation angle, and L(θ + δ) are the loss function values of the quantum rotating gate after the rotation angle θ is deflected by δ.
[0121] In some possible embodiments of this application, the apparatus further includes:
[0122] The sixth determining module is used to determine a first relationship by utilizing the relationship between the first derivatives of the loss functions of the quantum rotating gate at different angles, wherein the first relationship is the relationship between the loss function of the quantum rotating gate at one angle and the loss function at a specific angle, wherein the specific angle is the sum of the angle and π;
[0123] The seventh determining module is used to determine the relationship between the loss function and the length of the major axis, the length of the minor axis, and a constant using the first and second relationships, wherein the second relationship is the relationship between the second derivative of the loss function of the quantum rotating gate at an angle and the loss function at that angle;
[0124] A construction module is used to construct the parametric equations based on the relationship between the determined loss function and the major axis length, the minor axis length, and constants.
[0125] As can be seen, this application first determines multiple rotation angles for a quantum rotating gate; then, it determines the theoretical and actual expected values of the Hamiltonian corresponding to each rotation angle; and finally, it uses the distribution pattern formed by the theoretical and actual expected values of the Hamiltonian to determine the deflection angle of the quantum rotating gate on the quantum chip. By using the distribution pattern of the actual and theoretical expected values of the Hamiltonian at different rotation angles, the deflection angle of the quantum rotating gate on the quantum chip is determined. This allows for the determination of the actual rotation angle during operation on the quantum chip, reducing the impact of angle deflection on the final result and thus mitigating quantum errors.
[0126] See Figure 7 , Figure 7 This is a schematic diagram of the structure of an error mitigation device provided in an embodiment of this application. Figure 5 Corresponding to the process shown, the apparatus includes:
[0127] The fourth determining module 701 is used to determine the deflection angle of the quantum rotating gate on the quantum chip using the method provided in any of the above embodiments;
[0128] The fifth determining module 702 is used to determine the target rotation angle for operation on the quantum chip based on the deflection angle and the obtained rotation angle of the quantum rotating gate;
[0129] The operation module 703 is used to run the quantum rotating gate on the quantum chip at the target rotation angle.
[0130] As can be seen, this application first determines the deflection angle of the quantum rotating gate on the quantum chip, and then, based on the deflection angle and the obtained rotation angle of the quantum rotating gate, determines the target rotation angle for operation on the quantum chip; then, the quantum rotating gate is operated on the quantum chip at the target rotation angle. By correcting the rotation angle of the quantum rotating gate on the quantum chip, the impact of angle deviation on the final operating result is reduced, thereby mitigating quantum errors.
[0131] This application also provides a storage medium storing a computer program configured to implement, when run, the method for determining the deflection angle of the quantum rotating gate or the error mitigation method in any of the above embodiments.
[0132] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to implement the method for determining the deflection angle of a quantum rotating gate or the error mitigation method in any of the above embodiments. The electronic device can be a classical computer. The electronic device can also be a quantum computer.
[0133] This application also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the method for determining the deflection angle of the quantum rotating gate or the error mitigation method in any of the above embodiments.
[0134] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this specification in any way.
[0135] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.
[0136] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0137] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0138] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0139] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.
[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.
[0141] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0143] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0144] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0145] The above description is merely a specific embodiment of this specification, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / h>
Claims
1. A method for determining the deflection angle of a quantum rotating door, characterized in that, The method includes: Determine multiple rotation angles for a single quantum rotating gate; Determine the theoretical Hamiltonian expectation value and the actual Hamiltonian expectation value corresponding to each of the said rotation angles of the quantum rotating gate, wherein the actual Hamiltonian expectation value is the expectation value measured by running a quantum circuit including the quantum rotating gate of the said rotation angle on a quantum chip; By taking the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian corresponding to a rotation angle as one set of data, multiple sets of data are obtained. Ellipse fitting is performed on the multiple sets of data to determine the feature parameters of the fitted ellipse, including the length of the major axis and the length of the minor axis of the fitted ellipse. The deflection angle of the quantum rotating gate on the quantum chip is calculated using the ratio of the major axis length to the minor axis length.
2. The method of claim 1, wherein, The plurality of rotation angles are obtained by scattering points within an angle range centered on a specific rotation angle, which is an angle selected from the rotation angle range of the quantum rotation gate.
3. The method of claim 1, wherein, The multiple rotation angles are obtained by uniformly sampling within the rotation angle range of the quantum rotation gate.
4. The method according to any one of claims 1-3, characterized in that, The deflection angle is calculated using the equation wherein, is the deflection angle, is the length of the major axis of the ellipse, is the length of the minor axis of the ellipse.
5. The method of claim 4, wherein, The parametric equation of the ellipse is: wherein, is a theoretical Hamiltonian expectation value, , is a true Hamiltonian expectation value, , is a constant, is a loss function value of the quantum rotation gate at a corresponding rotation angle, is a loss function value of the quantum rotation gate at a rotation angle deflection corresponding loss function value.
6. The method according to claim 5, characterized in that, The method further includes: By utilizing the relationship between the first derivatives of the loss function of the quantum rotation gate at different angles, a first relationship is determined. This first relationship is the relationship between the loss function of the quantum rotation gate at one angle and the loss function at a specified angle, where the specified angle is the angle relative to the loss function at a given angle. sum; Using the first and second relationships, the relationship between the loss function and the length of the major axis, the length of the minor axis, and a constant is determined, wherein the second relationship is the relationship between the second derivative of the loss function of the quantum rotating gate at a certain angle and the loss function at that angle; The parametric equations are constructed based on the relationship between the determined loss function and the major axis length, the minor axis length, and constants.
7. An error mitigation method, characterized in that, The method includes: Using the method described in any one of claims 1-6, the deflection angle of the quantum rotating gate on the quantum chip is determined; Based on the deflection angle and the obtained rotation angle of the quantum rotating gate, the target rotation angle for operation on the quantum chip is determined; The quantum rotation gate operates on the quantum chip at the target rotation angle.
8. A device for determining the deflection angle of a quantum rotating door, characterized in that, The device includes: The first determining module is used to determine multiple rotation angles for a quantum rotating gate; The second determining module is used to determine the theoretical Hamiltonian expectation value and the actual Hamiltonian expectation value corresponding to the quantum rotating gate for each rotation angle, wherein the actual Hamiltonian expectation value is the expectation value measured by running a quantum circuit including the quantum rotating gate with the rotation angle on a quantum chip. The third determining module is used to take the expected value of the theoretical Hamiltonian and the expected value of the actual Hamiltonian corresponding to a rotation angle as a set of data to obtain multiple sets of data; to perform ellipse fitting on the multiple sets of data to determine the characteristic parameters of the fitted ellipse, the characteristic parameters including the length of the major axis and the length of the minor axis of the fitted ellipse; and to calculate the deflection angle of the quantum rotating gate on the quantum chip using the ratio of the length of the major axis and the length of the minor axis.
9. An error mitigation device, characterized in that, The device includes: The fourth determining module is used to determine the deflection angle of the quantum rotating gate on the quantum chip using the method described in any one of claims 1-6; The fifth determining module is used to determine the target rotation angle for operation on the quantum chip based on the deflection angle and the obtained rotation angle of the quantum rotating gate; The operating module is used to run the quantum rotating gate on the quantum chip at the target rotation angle.
10. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to implement, when running, the method for determining the deflection angle of the quantum rotating gate as described in any one of claims 1 to 6 or the error mitigation method as described in claim 7.
11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to implement the method for determining the deflection angle of the quantum rotating gate as described in any one of claims 1 to 6 or the error mitigation method as described in claim 7.
Citation Information
Patent Citations
Quantum program processing method and device, storage medium and electronic device
CN110929873A
Numerical control device and control method
CN112904797A
