Quantum control signal optimization method and device, terminal equipment and storage medium

By adding interference data to the quantum system and optimizing the pulse sequence to improve the accuracy and robustness of the quantum gate, the problem of low quantum gate precision in quantum computing is solved, and highly reliable quantum computing is achieved.

CN117540813BActive Publication Date: 2026-05-22CHINA GREATWALL TECH GRP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA GREATWALL TECH GRP CO LTD
Filing Date
2023-10-28
Publication Date
2026-05-22

Smart Images

  • Figure CN117540813B_ABST
    Figure CN117540813B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of quantum technology, and provides a quantum control signal optimization method and device, terminal equipment and a storage medium, which comprises: taking a first pulse sequence as an input of a disturbed quantum system to obtain a first quantum gate of evolution of the disturbed quantum system, the disturbed quantum system being a quantum system after first disturbance data is added, and the first pulse sequence being used to control state evolution of a corresponding quantum bit to achieve a target quantum gate; determining a fidelity corresponding to the first quantum gate, the fidelity reflecting similarity between the first quantum gate and the corresponding target quantum gate; and updating the first pulse sequence according to the fidelity to obtain an updated first pulse sequence, wherein the updated first pulse sequence is used to control state evolution of the corresponding quantum bit to optimize the first quantum gate corresponding to the first pulse sequence before the update. The application can improve accuracy and robustness of the quantum gate realized by the first pulse sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of quantum technology, and in particular relates to quantum control signal optimization methods, devices, terminal equipment and computer-readable storage media. Background Technology

[0002] Quantum computing can achieve exponential or polynomial speedup compared to classical computing for specific tasks. Currently, in quantum computing based on superconducting quantum circuits, it is necessary to adjust the state of the qubits through microwave pulse sequences and magnetic flux bias signals to realize the corresponding quantum gate operations.

[0003] To achieve highly reliable and error-correctable quantum computing, it is necessary to perform extremely high-precision quantum gate operations on a large number of qubits. However, due to the interference of other qubits, signal distortion, and other factors, the precision of the quantum gates currently implemented is relatively low. Summary of the Invention

[0004] This application provides a method, apparatus, terminal device, and storage medium for optimizing quantum gate control signals, which can improve the accuracy of quantum gates implemented by the first pulse sequence.

[0005] In a first aspect, embodiments of this application provide a quantum control signal method, including:

[0006] Using the first pulse sequence as input to the perturbed quantum system, the first quantum gate of the perturbed quantum system is obtained. The perturbed quantum system is the quantum system after adding the first perturbation data. The perturbed quantum system is used to apply the input first pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the first pulse sequence and obtain the first quantum gate. The first pulse sequence is used to control the state evolution of the corresponding qubit.

[0007] The fidelity of the first quantum gate is determined based on the first quantum gate and the target quantum gate, wherein the target quantum gate is the quantum gate that the first pulse sequence is expected to achieve;

[0008] The first pulse sequence is updated according to the fidelity to obtain the updated first pulse sequence, wherein the updated first pulse sequence is used to control the state evolution of the corresponding qubit, so as to optimize the first quantum gate corresponding to the first pulse sequence before the update.

[0009] Secondly, embodiments of this application provide a quantum control signal optimization device, comprising:

[0010] The first quantum gate acquisition module is used to take the first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate evolved by the disturbed quantum system. The disturbed quantum system is a quantum system after adding the first disturbance data. The disturbed quantum system is used to apply the input first pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the first pulse sequence and obtain the first quantum gate. The first pulse sequence is used to control the state evolution of the corresponding qubit to realize the target quantum gate.

[0011] A fidelity acquisition module is used to determine the fidelity of the first quantum gate based on the first quantum gate and the target quantum gate, wherein the target quantum gate is the quantum gate that the first pulse sequence is expected to realize;

[0012] An update module is used to update the first pulse sequence according to the fidelity to obtain an updated first pulse sequence, wherein the updated first pulse sequence is used to control the state evolution of the corresponding qubit to optimize the first quantum gate corresponding to the first pulse sequence before the update.

[0013] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the quantum control signal optimization method described in the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the quantum control signal optimization method described in the first aspect above.

[0015] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the quantum control signal optimization method described in any one of the first aspects.

[0016] The beneficial effects of the embodiments in this application compared with the prior art are:

[0017] In this embodiment, a first pulse sequence is input into a disturbed quantum system to obtain a first quantum gate evolved from the disturbed quantum system. The addition of disturbance data to the disturbed quantum system makes the resulting first quantum gate more consistent with real-world applications. Furthermore, since the first quantum gate corresponds to the actual first pulse sequence realized by the disturbed quantum system, and the target quantum gate is the expected quantum gate realized by the first pulse sequence, the fidelity of the first pulse sequence is determined based on the first and second quantum gates. This fidelity reflects the difference between the actual first quantum gate and the expected target quantum gate. The first pulse sequence is then updated based on this fidelity. The updated first pulse sequence, compared to the unupdated sequence, achieves a more precise first quantum gate, bringing it closer to the expected target quantum gate, thus optimizing the realized first quantum gate. Furthermore, since interference data is added to the quantum system during the update of the first pulse sequence, in subsequent practical applications, when the quantum gate corresponding to the updated first pulse sequence is implemented using a quantum system without interference data, the updated first pulse sequence is robust to the interference actually present in the quantum system without interference. This allows for accurate implementation of the required quantum gate even when interference exists in the quantum system itself, improving the accuracy and precision of the quantum gate and thus reducing the need for calibration. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0019] Figure 1 This is a schematic flowchart of a quantum control signal optimization method provided in an embodiment of this application;

[0020] Figure 2 This is a schematic diagram of the structure of the quantum control signal optimization device provided in the embodiments of this application;

[0021] Figure 3 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation

[0022] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0023] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0024] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0025] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0026] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0027] Before describing the embodiments of this application, some terms used in this application will be explained.

[0028] Example 1:

[0029] Figure 1 A flowchart illustrating a quantum control signal optimization method provided by an embodiment of the present invention is shown below, in detail:

[0030] Step S101: The first pulse sequence is used as the input to the quantum system after interference to obtain the first quantum gate of the quantum system after interference. The quantum system after interference is the quantum system after the first interference data is added.

[0031] The aforementioned first pulse sequence is used to control the state evolution of the corresponding qubit to achieve the target quantum gate. That is, the first pulse sequence is the control pulse signal of the qubit in the quantum system, which can control the quantum state change of the qubit to achieve the corresponding quantum gate operation. Optionally, the first pulse sequence can be a continuous pulse signal (i.e., a pulse waveform) generated by an arbitrary waveform generator or other waveform generators such as a function generator or a pulse generator.

[0032] The aforementioned perturbed quantum system is used to apply the input first pulse sequence to the corresponding qubit, thereby realizing the quantum gate corresponding to the first pulse sequence and obtaining the first quantum gate. It can be understood that the state of the perturbed quantum system at the initial moment (i.e., the moment before the input first pulse sequence) is equivalent to the initial quantum state of the quantum system (the quantum state of the quantum system is determined by the quantum states of the qubits within the quantum system). After the first pulse sequence is input into the perturbed quantum system and applied to the corresponding qubit, the state of the corresponding qubit in the quantum system (i.e., the quantum state of the quantum system) changes accordingly with the change of the first pulse sequence. After the first pulse sequence ends, the final quantum state is obtained based on the quantum state of the quantum system at this point, thus realizing the first quantum gate corresponding to the first pulse sequence. The aforementioned state evolution of the qubit, i.e., the change of the quantum state of the qubit over time, involves the qubit having two logical states, 0 and 1. The qubit can be placed in a superposition of 0 and 1 states through coherent superposition.

[0033] Specifically, in practical applications, during the hardware implementation of the quantum gate operation based on the evolution of the quantum system according to the control pulse (i.e., pulse sequence), the quantum gate implemented by the quantum system may differ from the expected ideal quantum gate due to distortion, decoherence, and / or crosstalk. Therefore, in order to improve the accuracy of the implemented quantum gate, in this embodiment, interference data is added to the quantum system, and then the first pulse sequence used to implement the target quantum gate is used as the input of the interfered quantum system. The state evolution of the corresponding qubit in the interfered quantum system is controlled by the first pulse sequence to obtain the actually implemented quantum gate, i.e., the first quantum gate.

[0034] Optionally, when adding first interference data to the quantum system, the first interference data can be randomly determined interference data, or it can be specific interference data determined for a specific interference situation (including but not limited to noise, crosstalk, signal distortion, etc.). For example, if it is believed that crosstalk may occur during the hardware implementation of the quantum system, an additional pulse sequence can be applied to other qubits in the quantum system, causing crosstalk to the target qubit (i.e., the qubit corresponding to the first pulse sequence) during the implementation of the first quantum gate. This results in the first quantum gate obtained by the quantum system after interference being a quantum gate affected by crosstalk. This allows for targeted updates to the first pulse sequence to address crosstalk (e.g., direct compensation of the first pulse sequence), making the first pulse sequence robust to crosstalk during actual hardware implementation, thereby enabling the realization of a crosstalk-resistant quantum gate.

[0035] In this embodiment, since first interference data is added to the quantum system to obtain an interfered quantum system, the first quantum gate corresponding to the first pulse series is obtained based on the interfered quantum system. The obtained first quantum gate is more consistent with the actual hardware implementation process, so that subsequent optimization of the first pulse sequence based on the first quantum gate can be better optimized to achieve a quantum gate with higher accuracy and precision.

[0036] Step S102: Determine the fidelity of the first quantum gate based on the first quantum gate and the target quantum gate, wherein the target quantum gate is the quantum gate that the first pulse sequence is expected to realize.

[0037] Specifically, after the quantum system that has been disturbed realizes the first quantum gate corresponding to the first pulse sequence, the fidelity of the first quantum gate is determined based on the difference between the first quantum gate actually realized by the first pulse sequence and the target quantum gate that is expected to be realized. It can be understood that the fidelity reflects the degree of difference between the first quantum gate and the corresponding target quantum gate.

[0038] Optionally, when determining the fidelity of the first quantum gate, the fidelity can be calculated based on methods such as Cross-Entropy Benchmarking (XEB) or Randomized Benchmarking (RB). The XEB method assesses the error between the realized first quantum gate and the target quantum gate by comparing the difference between the final quantum state (corresponding to the first quantum gate) and the ideal quantum state (corresponding to the target quantum gate), thus obtaining the fidelity of the first quantum gate. The RB method statistically evaluates the error between the first quantum gate and the target quantum gate based on the cumulative error effect during the realization process, thus obtaining the fidelity of the first quantum gate.

[0039] In this embodiment, the difference between the implemented first quantum gate and the corresponding target quantum gate is calculated, and the first pulse sequence is optimized based on the existing difference, thereby achieving a first quantum gate with higher accuracy.

[0040] Step S103: Update the first pulse sequence according to the above fidelity to obtain the updated first pulse sequence. The updated first pulse sequence is used to control the state evolution of the corresponding qubit to optimize the first quantum gate corresponding to the first pulse sequence before the update.

[0041] Specifically, after determining the fidelity of the first quantum gate, the first pulse sequence can be updated based on the fidelity to optimize the first pulse sequence. This results in the first quantum gate realized by the updated first pulse sequence when applied to the corresponding qubit having a higher fidelity than the first quantum gate before the update. In other words, the first quantum gate realized by the updated first pulse sequence is closer to the target quantum gate that needs to be realized, thereby enabling the optimization of the first quantum gate.

[0042] Optionally, when updating the first pulse sequence based on this fidelity, the gradient of the first pulse sequence can be calculated using methods such as finite difference. Alternatively, the local minimum of the loss function can be found using methods such as the simplex method or Nelder-Mead based on this fidelity, and then the first pulse sequence can be updated using optimization methods such as stochastic optimization algorithm (Adam) or gradient descent to obtain the updated first pulse sequence. It is understood that the performance (such as robustness and / or accuracy) of the updated first pulse sequence is better than that of the unupdated first pulse sequence.

[0043] In this embodiment, by adding interference data to the quantum system, the interfered quantum system better matches the actual hardware implementation. That is, the first quantum gate obtained by inputting the first pulse sequence into the interfered quantum system is more consistent with reality. Simultaneously, since the first quantum gate is the quantum gate corresponding to the actual first pulse sequence implemented in the interfered quantum system, and the target quantum gate is the quantum gate expected to be implemented by the first pulse sequence, the fidelity corresponding to the first pulse sequence is determined based on the first quantum gate and the target quantum gate. This fidelity reflects the difference between the actual first quantum gate and the expected target quantum gate. Furthermore, the first pulse sequence is updated based on this fidelity. The updated first pulse sequence, compared to the unupdated first pulse sequence, can achieve a more accurate first quantum gate, making it closer to the expected target quantum gate, thereby optimizing the implemented first quantum gate. Furthermore, since interference data is added to the quantum system during the update of the first pulse sequence, in practical applications, when the quantum gate corresponding to the updated first pulse sequence is implemented using a quantum system without interference data, the updated first pulse sequence is robust to the interference inherent in the quantum system without interference data. That is, the updated first pulse sequence has good robustness and can accurately implement the required quantum gate even when there is interference in the quantum system itself, thereby improving the accuracy of the quantum gate.

[0044] In some embodiments, prior to step S101 described above, the method further includes:

[0045] Obtain the second pulse sequence, which is determined based on the target quantum gate.

[0046] Based on the aforementioned second pulse sequence, a first update operation is performed to obtain the updated second pulse sequence. The first update operation is used to optimize the aforementioned second pulse sequence.

[0047] The updated second pulse sequence is used as the first pulse sequence.

[0048] The first update operation mentioned above includes:

[0049] Using the aforementioned second pulse sequence as input to the quantum system, a second quantum gate is obtained from the output of the quantum system. The quantum system is then used to apply the aforementioned second pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the aforementioned second pulse sequence, thus obtaining the aforementioned second quantum gate.

[0050] Determine the fidelity corresponding to the second quantum gate.

[0051] The second pulse sequence is updated based on the fidelity corresponding to the second quantum gate.

[0052] Specifically, in order to obtain a first pulse sequence with high accuracy, in this embodiment of the application, an initial pulse waveform, i.e., a second pulse sequence, is first obtained according to the target quantum gate. Then, a first update operation is performed based on the second pulse sequence to optimize the second pulse sequence. The optimized (i.e., updated) second pulse sequence is used as the first pulse sequence. Optionally, the first update operation updates the second pulse sequence based on the gradient of fidelity.

[0053] During the first update operation based on the second pulse sequence, the second pulse sequence is used as input to the quantum system. The quantum system applies the second pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the second pulse sequence, thus obtaining the second quantum gate. After obtaining the second quantum gate, the error between the second quantum gate and the corresponding target quantum gate is calculated to obtain the fidelity corresponding to the second quantum gate. Then, the second pulse sequence is updated according to the fidelity to obtain the updated second pulse sequence. It can be understood that the performance (e.g., accuracy) of the updated second pulse sequence is better than that of the unupdated second pulse sequence. Optionally, when updating the second pulse sequence according to the fidelity corresponding to the second quantum gate, the second pulse sequence can be updated based on algorithms such as gradient descent.

[0054] Optionally, when determining the second pulse sequence based on the target quantum gate, a pulse waveform can be randomly generated as the second pulse sequence, or a pulse waveform can be generated based on the target quantum gate, combined with experience or experimentation, as the second pulse sequence.

[0055] In some embodiments, to further improve the performance of the final obtained first pulse sequence, after obtaining the updated second pulse sequence according to the first update operation, it can be first determined whether the updated second pulse sequence meets a first preset requirement. If it is determined that the updated second pulse sequence does not meet the first preset requirement, the first update operation is repeated based on the updated second pulse sequence. That is, the updated second pulse sequence is updated again through the first update operation until the latest second pulse sequence meets the first preset requirement, and the second pulse sequence that meets the first preset requirement is taken as the first pulse sequence. The aforementioned first preset requirement is used to limit the performance of the updated second pulse sequence, such as the fidelity of the second quantum gate corresponding to the updated second pulse sequence reaching a preset fidelity threshold (e.g., 0.95), or the number of updates of the second pulse sequence reaching a preset number (e.g., 30 times).

[0056] It is understood that in this embodiment, the quantum system can be a quantum system with added random interference data (such as noise, crosstalk, etc.) or a quantum system without added random interference data. The second pulse sequence is updated through a first update operation, thereby optimizing the second pulse sequence. This results in the quantum gate implemented by the updated second pulse sequence (i.e., the first pulse sequence) that meets the first preset requirements having better fidelity, robustness, and other performance characteristics. In other words, a first pulse sequence with better performance is obtained. Further updating this first pulse sequence based on the interfered quantum system reduces the number of updates required, thus improving the optimization efficiency of the first pulse sequence. Simultaneously, the above update based on the already well-performing first pulse sequence makes it robust to interference present during hardware implementation and further optimizes the interference caused by distortion correction and other factors during the second pulse sequence update process, thereby improving the robustness and accuracy of the first pulse sequence.

[0057] In this embodiment, the obtained second pulse sequence is optimized through a first update operation. The optimized second pulse sequence with better performance is used as the first pulse sequence. The optimized robust second pulse sequence is used as the initial first pulse sequence for further optimization. This can reduce the number of iterations and improve the update efficiency of the first pulse sequence to a certain extent.

[0058] In some embodiments, the steps in the first update operation described above, which use the second pulse sequence as input to the quantum system to obtain the second quantum gate output by the quantum system, include:

[0059] Using the aforementioned second pulse sequence as input to the simulated quantum system, the aforementioned second quantum gate output by the simulated quantum system is obtained. The simulated quantum system is constructed based on the hardware structure of the aforementioned quantum system and is used to simulate applying the aforementioned second pulse sequence to the corresponding qubit, thereby simulating the implementation of the quantum gate corresponding to the aforementioned second pulse sequence and obtaining the aforementioned second gate.

[0060] Specifically, to reduce resource consumption, in this embodiment, a simulated quantum system is constructed based on the hardware structure and corresponding system parameters of the quantum system. This simulated quantum system can simulate the implementation of the second quantum gate corresponding to the second pulse sequence. When obtaining the second quantum gate corresponding to the second pulse sequence, the second pulse sequence is used as the input of the simulated quantum system. The simulated quantum system simulates applying the second pulse sequence to the corresponding qubit, thereby simulating the state evolution of the qubit with the second pulse sequence. Furthermore, it can simulate the state evolution of the quantum system, determine the final quantum state of the quantum system after the second pulse sequence ends, and determine the second quantum gate based on the final quantum state. That is, the second quantum gate is obtained by simulating the implementation of the quantum gate corresponding to the second pulse sequence.

[0061] Optionally, the above-mentioned simulated quantum system can be implemented based on the Hamiltonian function or on a simulation platform, etc. The embodiments of this application do not limit this.

[0062] In this embodiment, the second quantum gate corresponding to the second pulse sequence is obtained by simulating a quantum system, which eliminates the need to implement the second quantum gate through a quantum system with actual hardware structure, thereby reducing the consumption of computing resources.

[0063] In some embodiments, prior to step S101 described above, the method further includes:

[0064] Obtain the third pulse sequence, which is determined based on the target quantum gate.

[0065] Based on the aforementioned third pulse sequence, a second update operation is performed to obtain the updated third pulse sequence. The second update operation is used to optimize the aforementioned third pulse sequence.

[0066] The updated third pulse sequence is used as the first pulse sequence.

[0067] The second update operation mentioned above includes:

[0068] Perturbation expansion is performed based on the aforementioned third pulse sequence and the Hamiltonian function corresponding to the quantum system.

[0069] The Hamiltonian function is truncated according to the third preset requirement, and the loss function of the third pulse sequence is determined based on the truncated Hamiltonian function.

[0070] The third pulse sequence is updated based on the loss function described above.

[0071] The Hamiltonian function is determined based on the hardware structure of the quantum system and is used to describe the evolution of the quantum system after the third pulse sequence is applied to the corresponding qubit. It can be understood that the Hamiltonian function of the quantum system controls the evolution of the quantum system over time. That is, after the third pulse sequence is input, the third pulse sequence controls the state evolution of the corresponding qubit, and the Hamiltonian function controls the state evolution of the quantum system as the state of the qubit evolves. The quantum gate implemented by the quantum system according to the third pulse sequence can be determined through the Hamiltonian function.

[0072] Optionally, when determining the second pulse sequence based on the target quantum gate, a pulse waveform can be randomly generated as the second pulse sequence, or a pulse waveform can be generated based on the target quantum gate, combined with experience or experimentation, as the second pulse sequence.

[0073] It is understood that the second and third pulse sequences mentioned above can be the same or different pulse sequences. In some embodiments, when determining the first pulse sequence, different update operations can be performed on the generated pulse sequences, and the pulse sequence with better performance after the update can be used as the first pulse sequence. For example, the same or different second and third pulse sequences can be generated, and then a first update operation can be performed on the second pulse sequence to obtain an updated second pulse sequence, and a second update operation can be performed on the third pulse sequence to obtain an updated third pulse sequence. Then, the fidelity corresponding to the updated second and third pulse sequences can be determined respectively, and the pulse sequence with higher fidelity between the second and third pulse sequences can be used as the first pulse sequence. This allows us to understand the optimization effect of the second and third update operations, and obtain a pulse sequence with higher fidelity as the first pulse sequence, further improving the accuracy of the obtained first pulse sequence.

[0074] Specifically, in order to further improve optimization efficiency, in this embodiment of the application, after determining the third pulse sequence according to the target quantum gate, a second update operation is performed based on the third pulse sequence. The second update operation can update the third pulse sequence based on perturbation expansion. That is, the objective function is obtained by perturbation expansion, and the third pulse sequence is updated in a targeted manner according to the target optimization direction (i.e. the direction to be optimized, such as reducing interference from signal distortion, reducing interference from parameter drift, etc.) to obtain the updated third pulse sequence.

[0075] In some embodiments, to further improve the performance of the final obtained first pulse sequence, if the updated third pulse sequence does not yet meet the preset second preset requirement, a second update operation is performed based on the updated third pulse sequence until an updated third pulse sequence that meets the second preset requirement is obtained, and this updated third pulse sequence that meets the second preset requirement is used as the first pulse sequence. The aforementioned second preset requirement is used to limit the performance of the updated third pulse sequence, such as the fidelity of the third quantum gate corresponding to the updated third pulse sequence reaching a preset fidelity threshold (e.g., 0.9), or the number of updates to the third pulse sequence reaching a preset number (e.g., 10 times).

[0076] Before performing the second update operation based on the third pulse sequence, the corresponding Hamiltonian function is pre-constructed according to the hardware structure and system parameters of the quantum system. After obtaining the Hamiltonian function, it can be perturbed and expanded according to the interference term. The third pulse sequence is then substituted into the target position in the perturbed Hamiltonian function (the target position is the position of the control pulse of the quantum system in the Hamiltonian function). The target Hamiltonian function (i.e., the perturbed Hamiltonian function after substituting the third pulse sequence) is then truncated, and a loss function is set according to the perturbed Hamiltonian function. This loss function can include parameters for evaluating fidelity and robustness. The gradient corresponding to the loss function is calculated based on the truncated Hamiltonian function and the loss function. Finally, the third pulse sequence is updated using methods such as the steepest descent method or the quasi-Newton method to optimize it in the direction indicated by the third preset requirement.

[0077] Optionally, when truncating the Hamiltonian function, it can be truncated according to a third preset requirement. This third preset requirement is used to indicate the optimization direction of the third pulse sequence, such as improving fidelity and reducing parameter drift interference.

[0078] For example, assuming the target quantum gate is a single-bit quantum gate, and assuming the Hamiltonian function of the determined quantum system can be expressed as:

[0079] H(t)=δ d σ z +u x (t)σ x +u y (t)σ y

[0080] Where, δ d u is the difference between the frequency of the quantum bit driving signal and the characteristic frequency of the quantum bit. x (t) represents the control signal applied to the qubit in the x-direction (i.e., the third pulse sequence in the x-direction), u y(t) The control signal applied to the qubit in the y-direction (i.e., the third pulse sequence in the y-direction), where σ is the Pauli operator used to describe the operations and state transformations of the qubit. The Pauli operator includes operators in the x, y, and z directions, i.e., σ z σ x and σ y .

[0081] Based on this Hamiltonian function, the evolution of this quantum system can be expressed as:

[0082]

[0083] Where U(t) is the evolution equation of the quantum system, reflecting the change of the quantum state (i.e., quantum gate) of the quantum system over time. The equation representing the evolution of a quantum system under the influence of the Hamiltonian function, and the equation representing the change of the quantum system over time under the influence of the control signal (i.e., the third pulse sequence), where i is the imaginary unit, ∈ is the uncertainty parameter, which is the disturbance term of the quantum system, representing the uncertainty value of the characteristic frequency of the quantum system, which introduces additional random phase during the evolution of the quantum system.

[0084] Based on the perturbation ∈, perform a perturbation expansion of the evolution equation of the quantum system:

[0085] U(t)=U0(t)+∈U1(t)+∈ 2 U2(t)+…

[0086] Based on the expanded U(t), the evolution of the quantum system can be expressed as:

[0087]

[0088]

[0089] Where k is an integer. According to the above system of equations, the evolution equation of the quantum system under the influence of the Hamiltonian function is... Under perturbation, this becomes an infinite-order quantum evolution equation system. According to the third presupposition requirement (such as n-order robustness), this infinite-order quantum evolution equation system is truncated, for example, by selecting U0(t) to U... n (t), where n is an integer greater than 0 (e.g., 5), transforms the quantum system containing uncertainty into a deterministic nth-order perturbation expansion. To satisfy this third preset requirement, the third pulse sequence is optimized so that U0(T) (T is the total time of the third pulse sequence) corresponds to the target quantum gate, and U1(T) to U n (T) is 0.

[0090] The loss function of the third pulse sequence is determined based on the truncated quantum evolution equations and the third preset requirement (n-order robustness). The third pulse sequence is then updated based on this loss function to obtain the updated third pulse sequence.

[0091] In this embodiment, the third pulse sequence is updated in a targeted manner for the direction to be optimized by perturbation expansion, so that the updated third pulse sequence has good robustness and can accurately realize the required quantum gate under the presence of specific interference. At the same time, the third pulse sequence is optimized in a targeted manner to improve the optimization efficiency.

[0092] It should be noted that the first and second preset requirements mentioned above can be the same or different. The first and second update operations employ different methods to optimize the corresponding pulse sequences. The specific update operation used can be determined based on the actual application scenario, and this application embodiment does not impose any limitations on this.

[0093] For example, the first update operation is implemented based on a quantum system, which may contain uncertain interferences that affect the fidelity of the resulting second quantum gate. That is, when updating the second pulse sequence based on a quantum system, more emphasis is placed on the fidelity of the quantum gate, resulting in a random fidelity. The second update operation, however, is implemented based on perturbation expansion. It does not consider uncertain interferences in the quantum system during implementation, but it can truncate the Hamiltonian function according to the target optimization direction (such as robustness) and determine the loss function based on the truncated Hamiltonian function to update the third pulse sequence. In other words, it can update the third pulse sequence according to specific requirements, making the quantum gate implemented by the updated third pulse sequence more robust.

[0094] In some embodiments, the process of performing step S101 includes:

[0095] During the pulse duration of the first pulse sequence, the quantum states of the quantum system after the disturbance are measured at different sampling times to obtain multiple intermediate quantum gates.

[0096] Correspondingly, determining the fidelity corresponding to the first quantum gate includes:

[0097] The fidelity corresponding to each of the aforementioned intermediate quantum gates and the aforementioned first quantum gate is determined, wherein the fidelity of the aforementioned intermediate quantum gate reflects the similarity between the aforementioned intermediate quantum gate and the corresponding expected quantum gate corresponding to the aforementioned sampling time.

[0098] Specifically, since the first pulse sequence is a continuous waveform corresponding to a duration, after the first pulse sequence is applied to the corresponding qubit, the state of the quantum system evolves over time. During the process of the quantum state of the quantum system changing with the first pulse sequence, the quantum state corresponding to the quantum system at different times is usually different. Therefore, in order to further improve the update accuracy of the first pulse sequence, in the embodiments of this application, during the process of the quantum system after interference implementing the first quantum gate based on the first pulse sequence, that is, during the pulse duration of the first pulse sequence, the quantum state corresponding to the quantum system after interference at different sampling times is measured, and each quantum state is used as the intermediate quantum gate corresponding to the corresponding sampling time.

[0099] Correspondingly, when determining the fidelity of a quantum gate, the fidelity of each intermediate quantum gate and the first quantum gate is also determined. The fidelity of an intermediate quantum gate is determined based on the intermediate quantum gate and its corresponding expected quantum gate (i.e., the ideal quantum state that the quantum system should reach under the sampling time corresponding to the intermediate quantum gate). The fidelity of the intermediate quantum gate reflects the similarity between the intermediate quantum gate and its corresponding expected quantum gate.

[0100] Optionally, when measuring the quantum state of the quantum system after interference at different sampling times, the quantum state of the quantum system can be measured by quantum tomography (such as quantum state tomography) or other measurement methods.

[0101] Optionally, when determining the sampling time of the intermediate quantum gate, multiple different sampling times can be obtained by random sampling, or multiple different sampling times can be obtained by sampling at a preset frequency, thereby obtaining multiple different intermediate quantum gates.

[0102] In this embodiment, since the process of the quantum system realizing the first quantum gate is an evolutionary process, its state changes with the pulse time of the first pulse sequence. During this evolutionary process, the quantum state corresponding to the quantum system at different times is usually different. Therefore, during the process of the quantum system realizing the first quantum gate, the intermediate quantum gates corresponding to multiple sampling times of the quantum system and the fidelity of each intermediate quantum gate are measured. This allows for subsequent analysis of the accumulated error in the process of realizing the first quantum gate based on the multiple intermediate quantum gates, the first quantum gate, and the corresponding fidelity. This enables the analysis of how to accurately update the first pulse sequence by combining the accumulated error and each specific error, thereby improving the accuracy of the updated first pulse sequence.

[0103] In some embodiments, prior to step S101 described above, the method further includes:

[0104] By adding second interference data to the first pulse sequence, multiple first pulse sequences with interference are obtained, wherein the pulse time corresponding to the second interference data in each of the first pulse sequences with interference is different.

[0105] Correspondingly, the first quantum gate for obtaining the evolution of the disturbed quantum system by using the first pulse sequence as input includes:

[0106] Each of the aforementioned first pulse sequences after interference is used as the input to the aforementioned quantum system after interference, to obtain the aforementioned first quantum gate corresponding to the aforementioned first pulse sequence after interference output by the aforementioned quantum system.

[0107] Specifically, during the process of realizing the first quantum gate based on the first pulse sequence, interference such as signal distortion may occur at each pulse time within the pulse duration of the first pulse sequence. When the same or different interference occurs at different pulse times, the final obtained first quantum gate may be different. Therefore, in this embodiment of the application, in order to further improve the accuracy of the obtained first pulse sequence, second interference data is added to the first pulse sequence to obtain multiple interfered first pulse sequences. In each interfered first pulse sequence, the pulse time corresponding to the addition of the second interference data is different. That is, it is equivalent to adding second interference data to multiple identical first pulse sequences at different pulse times in each first pulse sequence to obtain first pulse sequences interfered with at different pulse times.

[0108] Optionally, the second interference data added to each of the first pulse sequences can be the same interference data or different interference data. The second interference data can be randomly determined interference data or specific interference data determined for a specific interference situation (such as crosstalk, distortion, and noise).

[0109] It should be noted that, in some embodiments, when optimizing the first pulse sequence based on the gradient optimization method, in order to better calculate the gradient corresponding to the first pulse sequence, the aforementioned second interference data can also be a numerical sequence such as an arithmetic sequence. The gradient corresponding to the first pulse sequence is obtained by perturbing the first pulse sequence with the second interference data. In other embodiments, the aforementioned second interference data can also be a fixed small perturbation, such as a constant of 0.001.

[0110] It should be noted that when adding second interference data to the first pulse sequence, the second interference data can also be added to pulses acting on different Hamiltonian terms in the first pulse sequence, so that the interfered Hamiltonian terms are different in the first pulse sequence after interference, that is, the interference acts on different Hamiltonian terms. For example, suppose the pulse duration of the first pulse sequence A is T. In this first pulse sequence A, pulses with pulse durations between T1 and T2 (i.e., pulse subsequence A1 with duration T2-T1) act on Hamiltonian term B1, and pulses with pulse durations between T2 and T3 (i.e., pulse subsequence A2 with duration T3-T2) act on Hamiltonian term B2. When adding second interference data to this first pulse sequence A, one second interference data can be added to pulse subsequence A1 to obtain an interfered first pulse sequence (the interference acts on Hamiltonian term B1), and one second interference data can be added to pulse subsequence A2 to obtain an interfered first pulse sequence (the interference acts on Hamiltonian term B2). That is, second interference data is added to different pulse times in the first pulse sequence, and the Hamiltonian terms of the interference are different in the first pulse sequences after each interference.

[0111] Correspondingly, when obtaining the first quantum gate corresponding to the first pulse sequence, each disturbed first pulse sequence is used as the input to the quantum system to obtain the first quantum gate corresponding to each disturbed first pulse sequence. Similarly, when calculating the fidelity of the first pulse sequence based on the first quantum gate and the target quantum gate, the fidelity (i.e., the target fidelity) corresponding to each disturbed first pulse sequence is calculated based on the first quantum gate corresponding to each disturbed first pulse sequence and the same target quantum gate.

[0112] In this embodiment, second interference data is added to the first pulse sequence at different pulse times to obtain different interfered first pulse sequences. This allows for the analysis of the first quantum gate of each interfered first pulse sequence to determine the difference between the final obtained first quantum gate and the target quantum gate when the same or different interference occurs at different pulse times of the first pulse sequence. This enables the calculation of gradients to better optimize the first pulse sequence, thereby improving the optimization efficiency and the accuracy of the final obtained first pulse sequence.

[0113] In some embodiments, the above steps involve adding second interference data to the first pulse sequence to obtain multiple interfering first pulse sequences, including:

[0114] By adding random numbers to different pulse times in the first pulse sequence described above, multiple first pulse sequences after the aforementioned interference are obtained.

[0115] Correspondingly, step S103 above includes:

[0116] The gradient is calculated based on the fidelity of the first pulse sequence after each of the above-mentioned interferences and the above-mentioned random numbers.

[0117] The first pulse sequence is updated based on the gradient described above to obtain the updated first pulse sequence.

[0118] Specifically, when there are many perturbed first pulse sequences, calculating the gradient corresponding to each fidelity based on the fidelity of each perturbed first pulse sequence and then optimizing the first pulse sequence based on each gradient is computationally intensive. Therefore, in order to reduce the computational load and improve the model training efficiency, while optimizing the first pulse sequence better, in this embodiment, the second perturbation data added to the first pulse sequence can be random numbers. That is, multiple random numbers are obtained (such as multiple consecutive random numbers obtained from a random number sequence). Different random numbers are added to the first pulse sequence at different perturbation times to obtain multiple perturbed first pulse sequences. Correspondingly, the first quantum gate and fidelity corresponding to each perturbed first pulse sequence can be obtained. Since the perturbed first pulse sequence contains random numbers, that is, the fidelity is perturbed by random numbers to obtain perturbed fidelities, so that the gradient can be estimated based on each random number and perturbed fidelities. Then, the first pulse sequence is updated based on the calculated gradient to obtain the updated first pulse sequence.

[0119] In this embodiment, the perturbation of each fidelity is achieved based on random numbers. The direction of change of the perturbed fidelity is the gradient direction. Therefore, when calculating the gradient of the first pulse sequence based on the perturbed fidelity, the gradient can be calculated quickly, and the first pulse sequence can be updated based on the gradient to optimize the first pulse sequence and improve the accuracy of the updated first pulse sequence.

[0120] In some embodiments, the above steps involve adding second interference data to the first pulse sequence to obtain multiple interfering first pulse sequences, including:

[0121] Get a random number sequence.

[0122] Based on the above random number sequence, the above first pulse sequence is subjected to overall interference in different directions to obtain two different first pulse sequences after the above interference.

[0123] Correspondingly, step S103 above includes:

[0124] The gradient is calculated based on the first fidelity, the second fidelity, and the random number sequence. The first fidelity and the second fidelity are the fidelities corresponding to the first pulse sequences after the two aforementioned interferences.

[0125] The first pulse sequence is updated based on the gradient described above to obtain the updated first pulse sequence.

[0126] Specifically, in order to further improve the efficiency of gradient calculation, a random number sequence can be obtained, and the first pulse sequence can be perturbed in different directions using the random number sequence to obtain two different perturbed first pulse sequences. Correspondingly, the two different perturbed pulse sequences are input into the perturbed quantum system to obtain two first quantum gates evolved by the perturbed quantum system, as well as the fidelity corresponding to the two quantum gates (i.e., the first fidelity and the second fidelity).

[0127] When updating the first pulse sequence based on fidelity, the gradient is directly calculated based on the first and second fidelities and the random number sequence used during perturbation. Then, the first pulse sequence is updated based on the calculated gradient, resulting in an updated first pulse sequence, thus optimizing the first pulse sequence. It is understood that the first and second fidelity sequences are results under different perturbations (i.e., interferences).

[0128] Optionally, when perturbing the first pulse sequence in different directions according to the random number sequence, random numbers from the random number sequence can be added to the first pulse sequence at different pulse times. That is, a complete random number sequence can be added to the first pulse sequence. The first pulse sequence can be added to the random number sequence to obtain the first pulse sequence with positive perturbation, and the first pulse sequence can be subtracted from the random number sequence to obtain the second random sequence with negative perturbation. Thus, two first pulse sequences after perturbation in different directions are obtained. Then, when calculating the gradient, the gradient can be calculated using the difference method based on the first fidelity and the second fidelity.

[0129] For example, assuming the target quantum gate is a single-bit quantum gate, and assuming the fidelity of the first pulse sequence is:

[0130]

[0131] Where M represents the input direction of the control pulse in the first pulse sequence, including the x-axis direction and the y-axis direction. For example, when M is an odd number, it means that the input direction of the control pulse is the x-axis direction, and when M is an even number, it means that the input direction of the control pulse is the y-axis direction. N is a positive integer.

[0132] u1(t1) is the control pulse of the first pulse sequence at time t1 in the x-axis direction. M (tj) represents the control pulse of the first pulse sequence at time tj in the corresponding input direction.

[0133] To calculate the gradient g(tj) at time tj, it is necessary to use random numbers ε to process the first pulse sequence. The control pulse u at time tj i (tj) is used to perform a perturbation, i.e. To obtain gradient

[0134] Calculating the gradient based on the fidelity of the first pulse sequence after various perturbations requires extensive computation, is complex, and demands significant computing power. Therefore, to reduce the difficulty and computational resources required for gradient calculation in practical applications, a random number sequence is used to perturb the first pulse sequence in different directions to obtain the first fidelity. Second fidelity

[0135] When calculating the gradient of the first pulse sequence, the gradient of the first pulse sequence can be obtained by the following formula:

[0136]

[0137] in, Let k be the gradient of the first pulse sequence, and k be a preset parameter. It is a sequence of random numbers. The random number sequence can be in the following form:

[0138]

[0139] Where N is a positive integer.

[0140] In this embodiment, a random number sequence is used to perturb the fidelity sequence in different directions to obtain a first fidelity and a second fidelity. Then, based on the first fidelity, the second fidelity, and the random number sequence, the gradient corresponding to the first pulse sequence is calculated using the difference method. This eliminates the need to perturb the first interference pulse sequence with a large number of random numbers, resulting in a large number of perturbed first pulse sequences, and then perform a large number of calculations based on the fidelity corresponding to the perturbed first pulse sequences. This improves the efficiency of gradient calculation and reduces the number of measurements of the perturbed first pulse sequences, thereby improving the update efficiency of the first pulse sequence.

[0141] It should be understood that the sequence number of each step in the above embodiments 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 constitute any limitation on the implementation process of the embodiments of this application.

[0142] Example 2:

[0143] Corresponding to the image processing method described in the above embodiments, Figure 2A structural block diagram of the quantum control signal optimization device provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0144] Reference Figure 2 The device includes: a first quantum gate acquisition module 21, a fidelity acquisition module 22, and an update module 23. Among them,

[0145] The first quantum gate acquisition module 21 is used to take the first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate evolved from the disturbed quantum system. The disturbed quantum system is the quantum system after adding the first disturbance data. The disturbed quantum system is used to apply the input first pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the first pulse sequence and obtain the first quantum gate. The first pulse sequence is used to control the state evolution of the corresponding qubit to realize the target quantum gate.

[0146] The fidelity acquisition module 22 is used to determine the fidelity of the first quantum gate based on the first quantum gate and the target quantum gate, wherein the target quantum gate is the quantum gate that the first pulse sequence is expected to realize.

[0147] The update module 23 is used to update the first pulse sequence according to the fidelity to obtain the updated first pulse sequence. The updated first pulse sequence is used to control the state evolution of the corresponding qubit to optimize the first quantum gate corresponding to the first pulse sequence before the update.

[0148] In this embodiment, by adding interference data to the quantum system, the interfered quantum system better matches the actual hardware implementation. That is, the first quantum gate obtained by inputting the first pulse sequence into the interfered quantum system is more consistent with reality. Simultaneously, since the first quantum gate is the quantum gate corresponding to the actual first pulse sequence implemented by the interfered quantum system, and the target quantum gate is the quantum gate expected to be implemented by the first pulse sequence, the fidelity of the first pulse sequence is determined based on the first and second quantum gates. This fidelity reflects the difference between the actual first quantum gate and the expected target quantum gate. Furthermore, the first pulse sequence is updated based on this fidelity. The updated first pulse sequence, compared to the unupdated first pulse sequence, can achieve a more accurate first quantum gate, making it closer to the expected target quantum gate, thereby optimizing the implemented first quantum gate. Furthermore, since interference data is added to the quantum system during the update of the first pulse sequence, in practical applications, when the quantum gate corresponding to the updated first pulse sequence is implemented using a quantum system without interference data, the updated first pulse sequence is robust to the interference inherent in the quantum system without interference data. That is, the updated first pulse sequence has good robustness and can accurately implement the required quantum gate even when there is interference in the quantum system itself, thereby improving the accuracy of the quantum gate.

[0149] In some embodiments, the quantum control signal optimization device further includes:

[0150] The second pulse sequence acquisition module is used to acquire a second pulse sequence, which is determined according to the target quantum gate.

[0151] The first update module is used to perform a first update operation based on the second pulse sequence to obtain the updated second pulse sequence. The first update operation is used to optimize the second pulse sequence.

[0152] The first pulse sequence acquisition module is used to use the updated second pulse sequence as the first pulse sequence.

[0153] The first update module mentioned above includes:

[0154] The second quantum gate acquisition unit is used to take the second pulse sequence as the input of the quantum system to obtain the second quantum gate output by the quantum system. The quantum system is used to apply the second pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the second pulse sequence and obtain the second quantum gate.

[0155] The fidelity acquisition unit is used to determine the fidelity corresponding to the second quantum gate.

[0156] The update unit is used to update the second pulse sequence according to the fidelity corresponding to the second quantum gate.

[0157] In some embodiments, the quantum control signal optimization device further includes:

[0158] The simulation module is used to take the second pulse sequence as the input of the simulated quantum system to obtain the second quantum gate output by the simulated quantum system. The simulated quantum system is constructed according to the hardware structure of the quantum system and is used to simulate applying the second pulse sequence to the corresponding qubit, simulate the implementation of the quantum gate corresponding to the second pulse sequence, and obtain the second quantum gate.

[0159] In some embodiments, the quantum control signal optimization device further includes:

[0160] The third pulse sequence acquisition module is used to acquire the third pulse sequence, which is determined according to the target quantum gate.

[0161] The second update module is used to perform a second update operation based on the third pulse sequence to obtain the updated third pulse sequence. The second update operation is used to optimize the third pulse sequence.

[0162] The first update sequence acquisition module is used to use the updated third pulse sequence as the first pulse sequence.

[0163] The second update module mentioned above includes:

[0164] The perturbation expansion unit is used to perform perturbation expansion based on the aforementioned third pulse sequence and the Hamiltonian function corresponding to the quantum system. The Hamiltonian function is determined according to the hardware structure of the aforementioned quantum system and is used to describe the state evolution of the aforementioned quantum system after the aforementioned third pulse sequence is applied to the corresponding qubit.

[0165] The loss function determination unit is used to truncate the Hamiltonian function and determine the loss function of the third pulse sequence based on the truncated Hamiltonian function.

[0166] The update unit is used to update the third pulse sequence according to the loss function described above.

[0167] In some embodiments, the quantum control signal optimization device further includes:

[0168] An interference module is used to add second interference data to the first pulse sequence to obtain multiple interfered first pulse sequences, wherein the pulse time corresponding to the second interference data in each of the interfered first pulse sequences is different.

[0169] Correspondingly, the first quantum gate acquisition module is used to take each of the above-mentioned disturbed first pulse sequences as input to the above-mentioned disturbed quantum system, and obtain the first quantum gate corresponding to the above-mentioned disturbed first pulse sequence output by the above-mentioned quantum system.

[0170] In some embodiments, the update module 23 includes:

[0171] The first perturbation unit is used to add random numbers to different pulse times in the first pulse sequence to obtain multiple first pulse sequences after the above perturbation.

[0172] The first gradient calculation unit is used to calculate the gradient based on the fidelity of the first pulse sequence after each of the above-mentioned disturbances and the above-mentioned random numbers.

[0173] The update unit is used to update the first pulse sequence according to the gradient to obtain the updated first pulse sequence.

[0174] In some embodiments, the update module 23 further includes:

[0175] The random number generation unit is used to generate a random number sequence.

[0176] The second perturbation unit is used to perform overall perturbation on the first pulse sequence in different directions based on the above random number sequence, so as to obtain two different first pulse sequences after the above perturbation.

[0177] The second gradient calculation unit is used to calculate the gradient based on the first fidelity, the second fidelity, and the random number sequence, wherein the first fidelity and the second fidelity are the fidelities corresponding to the first pulse sequences after the two interferences.

[0178] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0179] Example 3:

[0180] Figure 3 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 3 As shown, the terminal device 3 in this embodiment includes: at least one processor 30 ( Figure 3 The diagram shows only one processor, a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 executes the computer program 32 to implement the steps in any of the above method embodiments.

[0181] The terminal device 3 can be a desktop computer, laptop, handheld computer, or cloud server, etc. This terminal device may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of terminal device 3 and does not constitute a limitation on terminal device 3. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0182] The processor 30 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0183] In some embodiments, the memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. In other embodiments, the memory 31 may be an external storage device of the terminal device 3, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device 3. Furthermore, the memory 31 may include both internal and external storage units of the terminal device 3. The memory 31 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 31 can also be used to temporarily store data that has been output or will be output.

[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0185] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.

[0186] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0187] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the above-described method embodiments.

[0188] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0189] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0190] 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 application.

[0191] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or 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.

[0192] 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 according to actual needs.

[0193] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A quantum control signal optimization method, characterized in that, include: Using the first pulse sequence as input to the disturbed quantum system, the first quantum gate of the disturbed quantum system is obtained. The disturbed quantum system is the quantum system after adding the first disturbance data. The disturbed quantum system is used to apply the input first pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the first pulse sequence, thereby obtaining the first quantum gate. The first pulse sequence is used to control the state evolution of the corresponding qubit. The first disturbance data is specific disturbance data determined for a specific disturbance situation. The fidelity of the first quantum gate is determined based on the first quantum gate and the target quantum gate, wherein the target quantum gate is the quantum gate that the first pulse sequence is expected to achieve; The first pulse sequence is updated according to the fidelity to obtain the updated first pulse sequence, wherein the updated first pulse sequence is used to control the state evolution of the corresponding qubit, so as to optimize the first quantum gate corresponding to the first pulse sequence before the update.

2. The quantum control signal optimization method as described in claim 1, characterized in that, Before using the first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate of the evolution of the disturbed quantum system, the method further includes: Obtain a second pulse sequence, which is determined based on the target quantum gate; A first update operation is performed based on the second pulse sequence to obtain an updated second pulse sequence. The first update operation is used to optimize the second pulse sequence. The updated second pulse sequence is used as the first pulse sequence; The first update operation includes: Using the second pulse sequence as input to the quantum system, a second quantum gate is obtained from the output of the quantum system. The quantum system is used to apply the second pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the second pulse sequence, thus obtaining the second gate. Determine the fidelity corresponding to the second quantum gate; The second pulse sequence is updated based on the fidelity corresponding to the second quantum gate.

3. The quantum control signal optimization method as described in claim 2, characterized in that, The quantum system is a simulated quantum system, and the step of using the second pulse sequence as input to the quantum system to obtain the second quantum gate output by the quantum system includes: The second pulse sequence is used as the input to the simulated quantum system to obtain the second quantum gate output by the simulated quantum system. The simulated quantum system is constructed according to the hardware structure of the quantum system and is used to simulate applying the second pulse sequence to the corresponding qubit, simulate the implementation of the quantum gate corresponding to the second pulse sequence, and obtain the second quantum gate.

4. The quantum control signal optimization method as described in claim 1, characterized in that, Before using the first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate of the evolution of the disturbed quantum system, the method further includes: Obtain a third pulse sequence, which is determined based on the target quantum gate; A second update operation is performed based on the third pulse sequence to obtain an updated third pulse sequence. The second update operation is used to optimize the third pulse sequence. The updated third pulse sequence is used as the first pulse sequence; The second update operation includes: Perturbation expansion is performed based on the third pulse sequence and the Hamiltonian function corresponding to the quantum system. The Hamiltonian function is determined according to the hardware structure of the quantum system and is used to describe the state evolution of the quantum system after the third pulse sequence is applied to the corresponding qubit. The Hamiltonian function is truncated, and the loss function of the third pulse sequence is determined based on the truncated Hamiltonian function. The third pulse sequence is updated according to the loss function.

5. The quantum control signal optimization method according to any one of claims 1 to 4, characterized in that, Before using the first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate of the evolution of the disturbed quantum system, the process includes: By adding second interference data to the first pulse sequence, multiple interference-induced first pulse sequences are obtained, wherein the pulse time corresponding to the second interference data in each interference-induced first pulse sequence is different; Correspondingly, the step of using the first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate for the evolution of the disturbed quantum system includes: Each of the first pulse sequences after interference is used as the input to the quantum system after interference, and the first quantum gate corresponding to the first pulse sequence after interference is obtained from the output of the quantum system.

6. The quantum control signal optimization method as described in claim 5, characterized in that, The step of updating the first pulse sequence according to the fidelity to obtain the updated first pulse sequence includes: By adding random numbers to different pulse times in the first pulse sequence, multiple first pulse sequences after interference are obtained. Correspondingly, updating the first pulse sequence according to the fidelity to obtain the updated first pulse sequence includes: The gradient is calculated based on the fidelity of each of the first pulse sequences after interference and the random number. The first pulse sequence is updated according to the gradient to obtain the updated first pulse sequence.

7. The quantum control signal optimization method as described in claim 5, characterized in that, The step of updating the first pulse sequence according to the fidelity to obtain the updated first pulse sequence includes: Get a random number sequence; Based on the random number sequence, the first pulse sequence is subjected to overall interference in different directions to obtain two different first pulse sequences after the interference. Correspondingly, updating the first pulse sequence according to the fidelity to obtain the updated first pulse sequence includes: The gradient is calculated based on the first fidelity, the second fidelity, and the random number sequence, wherein the first fidelity and the second fidelity are the fidelities corresponding to the two first pulse sequences after interference; The first pulse sequence is updated according to the gradient to obtain the updated first pulse sequence.

8. A quantum control signal optimization device, characterized in that, include: The first quantum gate acquisition module is used to take a first pulse sequence as input to the disturbed quantum system to obtain the first quantum gate evolved by the disturbed quantum system. The disturbed quantum system is a quantum system with added first interference data. The disturbed quantum system is used to apply the input first pulse sequence to the corresponding qubit to realize the quantum gate corresponding to the first pulse sequence and obtain the first quantum gate. The first pulse sequence is used to control the state evolution of the corresponding qubit. The first interference data is specific interference data determined for a specific interference situation. A fidelity acquisition module is used to determine the fidelity of the first quantum gate based on the first quantum gate and the target quantum gate, wherein the target quantum gate is the quantum gate that the first pulse sequence is expected to realize; An update module is used to update the first pulse sequence according to the fidelity to obtain an updated first pulse sequence, wherein the updated first pulse sequence is used to control the state evolution of the corresponding qubit to optimize the first quantum gate corresponding to the first pulse sequence before the update.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.