Local door optimization method and device for quantum circuit, medium and equipment

By combining and normalizing native gates in quantum circuits and performing appropriate rotation operations, the technical problems of local gate optimization in quantum computing are solved, and more efficient and accurate quantum computing execution is achieved.

CN119647615APending Publication Date: 2025-03-18GUOKAIKE QUANTUM TECH (ANHUI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411492652.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

How to implement native gate optimization of quantum circuits in quantum computing to improve execution efficiency and accuracy.

Method used

By combining adjacent local doors of similar types (Rx gates or Ry gates), the angle value is normalized to the range [0, 2π), and the gate with the angle value in the range (π, 2π] is rotated about the corresponding coordinate axis, so that the angle value is in the range [0, π].

Benefits of technology

The redundant operation is streamlined to ensure that quantum circuits can be actually executed on the target platform, shortening execution time and improving the computing performance of quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647615A_ABST
    Figure CN119647615A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of quantum computing, and discloses a local gate optimization method and device for a quantum circuit, a medium and equipment. The method comprises the following steps: merging adjacent similar local doors, wherein the local doors are Rx doors or Ry doors; normalizing the angle value theta of the Rx gate and / or the Ry gate to a range of [0, 2pi); and rotating the Rx gate and / or the Ry gate of which the angle value theta is within the range of (pi, 2pi) around a corresponding coordinate axis until the angle value theta is within the range of [0, pi]. By applying the method, a redundant local gate can be simplified, it is ensured that the optimized quantum circuit can be actually executed on a target platform, and by simplifying the quantum circuit, the execution time is shortened, and the operation performance of quantum calculation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing technology, and in particular to a local gate optimization method, device, medium and equipment for quantum circuits. Background Art

[0002] A quantum computer is a device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, store and process quantum information. Quantum computing is a computing technology based on the principles of quantum mechanics. It uses the superposition and entanglement of quantum bits to quickly process large amounts of data and solve some problems that are difficult to solve with classical computing. The characteristics of quantum computing include fast operation speed, strong information processing capabilities, and a wide range of applications. Compared with classical computing, quantum computing is more suitable for processing large-scale and complex data, and can more efficiently solve some key problems, such as prime factorization and discrete logarithms.

[0003] Quantum computing is performed using quantum circuits, which are composed of universal gates (Universalquantum gates, referred to as universal gates) acting on quantum bits, usually written as quantum computing programs. The universal gate set includes: X gate, Y gate, Z gate, S gate, T gate, H gate, CNOT gate, CZ gate, etc. When the quantum program used in quantum computing is compiled, the universal gates in the quantum circuit are parsed into Native gates supported by the target quantum computing platform, usually called native gates (Nativequantum gates, referred to as native gates). That is, the quantum compiler writes high-level quantum gates into quantum circuits and reconstructs them into native gates that operate in quantum hardware. The native gate set of a quantum computer includes R gates, where R gates include ,because Can be decomposed into Combination of: , so the local door set can also be defined as including .

[0004] When a quantum computing program is executed, it is necessary to translate the quantum circuit composed of single-bit universal gates into a target quantum circuit composed of local gates. The target quantum circuit composed of local gates can be executed on the hardware target quantum platform. How to optimize the local gates used for quantum circuits on the target quantum platform has become a technical problem that needs to be solved. Summary of the invention

[0005] The object of the present invention is to provide a method, device, medium and equipment for optimizing local gates of quantum circuits, so as to improve the execution efficiency and accuracy of quantum circuits on a quantum platform by optimizing the local gates of quantum circuits.

[0006] According to one aspect of the present invention, there is provided a local gate optimization method for a quantum circuit, comprising: Merging adjacent local gates of the same type, wherein the local gates are Rx gates or Ry gates; Normalize the angle value θ of the Rx gate and / or the Ry gate to the range of [0, 2π); The Rx gate and / or Ry gate with an angle value θ in the range of (π, 2π] are rotated around the corresponding coordinate axis until the angle value θ is in the range of [0, π].

[0007] According to an embodiment of the present invention, merging adjacent similar local gates includes: merging two or more adjacent similar Rx gates into one Rx gate, and summing the angle values ​​θ of each similar Rx gate as the angle value of the merged Rx gate.

[0008] According to one embodiment of the present invention, merging adjacent similar local doors includes: merging two or more adjacent similar Ry doors into one Ry door, and summing the angle values ​​θ of the similar Ry doors as the angle value of the merged Ry door.

[0009] According to one embodiment of the present invention, the normalizing the angle value θ of the Rx gate and / or the Ry gate to the range of [0, 2π) includes: normalizing the angle value of the Ry gate with an angle value θ<0, and converting the normalized angle value to θ+2kπ in the range of [0, 2π), where k is a positive integer.

[0010] According to one embodiment of the present invention, the normalizing the angle value θ of the Rx gate and / or the Ry gate to the range of [0, 2π) includes: normalizing the angle value of the Ry gate with an angle value θ>2π, and converting the normalized angle value to θ-2kπ in the range of [0, 2π), where k is a positive integer; normalizing the angle value of the Rx gate with an angle value θ>2π, and converting the normalized angle value to θ-2kπ in the range of [0, 2π), where k is a positive integer.

[0011] According to one embodiment of the present invention, rotating the Rx gate and / or the Ry gate having an angle value θ in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π] includes: rotating the Rx gate having an angle value θ in the range of (π, 2π] around the corresponding coordinate axis by a positive angle 2π-θ in a negative direction, or rotating the Rx gate positively by an angle θ around the corresponding coordinate axis.

[0012] According to one embodiment of the present invention, rotating the Rx gate and / or the Ry gate having an angle value θ in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π] includes: rotating the Ry gate having an angle value θ in the range of (π, 2π] around the corresponding coordinate axis by a positive angle 2π-θ in a negative direction, or rotating the Ry gate positively by an angle θ around the corresponding coordinate axis.

[0013] According to another aspect of the present invention, there is provided a local gate optimization device for a quantum circuit, comprising: a merging unit, configured to merge adjacent local gates of the same type, wherein the local gates are Rx gates or Ry gates; a normalization unit configured to normalize the angle value θ of the Rx gate and / or the Ry gate to a range of [0, 2π); The rotation unit is configured to rotate the Rx gate and / or the Ry gate whose angle value θ is in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π].

[0014] According to another aspect of the present invention, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a processor, the local gate optimization method for quantum circuits as described above is implemented.

[0015] According to another aspect of the present invention, a computer device is provided, the computer device comprising: a processor; a memory storing a computer program, and when the computer program is executed by the processor, the native gate optimization method for quantum circuits as described above is implemented.

[0016] The technical solution for optimizing the local gates of quantum circuits in this application can merge multiple adjacent similar (Rx or Ry) gates, convert the rotation angle to the range of [0, π] through normalization operations and selection of positive or negative rotation around the coordinate axis. After optimization by these measures, redundant operations are simplified, ensuring that the quantum circuit can be actually executed on the target platform, simplifying the quantum circuit, shortening the execution time, and improving the performance of the quantum algorithm.

[0017] Compared with the prior art, the present invention has the following beneficial effects: (1) By merging adjacent local gates of the same type, redundant operations are simplified. In the quantum circuit, there are no adjacent Rx gates and / or Ry gates of the same type.

[0018] (2) By normalizing the Ry gates with negative angles, the Ry gates with negative angles are eliminated, so the duration of the corresponding interaction is positive, thereby ensuring that the quantum circuit can be executed on the target quantum platform.

[0019] (3) By choosing to rotate in the positive or negative direction around the coordinate axis, the angle θ is kept in the range of [0, π], thereby ensuring that the duration of the interaction between the corresponding microwave or laser radiation field on the quantum platform and the ions is minimized. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above objects and features of the present invention will become more apparent from the following description in conjunction with the accompanying drawings.

[0021] Figure 1 Shown is a schematic diagram of a Bloch sphere representing a quantum state according to an exemplary embodiment of the present invention.

[0022] Figure 2 Shown is a flow chart of a local gate optimization method for a quantum circuit according to an exemplary embodiment of the present invention.

[0023] Figure 3 Shown is a schematic diagram of a local gate optimization device for a quantum circuit according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0024] The concept of the present invention is to optimize the local gates for translating a quantum circuit composed of single-bit universal gates into a target quantum circuit composed of local gates, merge adjacent Rx gates and / or Ry gates of the same type, normalize the angle values ​​θ of the Rx gates and / or Ry gates, and rotate the Rx gates and / or Ry gates with angle values ​​θ in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π]. By optimizing the local gates of the quantum circuit, the redundant operations of adjacent local gates of the same type are simplified, ensuring that the quantum circuit composed of the local gates can be actually executed on the target quantum platform, shortening the execution time of the quantum circuit, and improving the computing performance of quantum computing.

[0025] Based on the above invention concept, the local gate optimization for quantum circuits on the target quantum platform can be realized to improve the execution performance of quantum computing. The technical solution of the present application is described in detail below in conjunction with the accompanying drawings and embodiments.

[0026] When a quantum computing program is executed, it is necessary to translate the quantum circuit composed of single-bit universal gates into the target quantum circuit composed of local gates, that is, to generate a quantum circuit composed of local gates. According to quantum computing knowledge, the mapping relationship between each universal gate and local gate is as follows:

[0027] According to the above mapping relationship between universal gates and local gates, the quantum circuit composed of single-bit universal gates can be translated into a target quantum circuit composed of local gates, and the target quantum circuit can be executed on the hardware target quantum platform.

[0028] like Figure 1 As shown, the quantum state can be represented as a vector v on the Bloch sphere. This local gate plays an important role in quantum computing. By applying , the vector v on the Bloch sphere can be rotated by an angle θ around the x-axis. This rotation operation can be used to change the state of the quantum bit. Similarly, v can be rotated about the y-axis by an angle θ, and v can be rotated about the z-axis by an angle θ.

[0029] After translating a quantum circuit composed of single-bit universal gates into a target quantum circuit composed of local gates, the target quantum circuit has the following problems to be solved or optimized: Case 1: Gates of the same type (Rx or Ry) are adjacent.

[0030] The target quantum circuit has adjacent Rx gates of the same type or adjacent Ry gates of the same type. In this case, it is necessary to merge multiple adjacent Rx gates of the same type or Ry gates of the same type into one.

[0031] Case 2: Ry gate with angle θ < 0 (i.e. negative angle).

[0032] The target quantum circuit will appear In addition, merging adjacent Ry gates of the same type in case 1 may also produce negative-angle Ry gates. In physical systems, the rotation angle θ is controlled by the duration of the interaction between the microwave or laser radiation field and the ion, so the negative-angle Ry gate cannot be executed. It is necessary to convert this negative-angle Ry gate into an Ry gate with an angle in the range [0, 2π).

[0033] Case 3: Rx gate or Ry gate with angle θ>2π.

[0034] Merging adjacent similar Rx gates or similar Ry gates may generate Rx gates or Ry gates with angles θ>2π. It is necessary to convert such Rx gates or Ry gates with angles θ>2π into Rx gates or Ry gates with angles in the range [0, 2π).

[0035] Case 4: Rx gate or Ry gate with angle in the range (π, 2π].

[0036] In the quantum circuits converted in the above cases 1 to 3, there may be Rx gates or Ry gates with angles in the range of (π, 2π]. It is necessary to convert the Rx gates or Ry gates with π<θ≤2π into Rx gates or Ry gates with a positive angle of 2π-θ rotated in the negative direction around the coordinate axis.

[0037] In the second case, the negative-angle gate situation involves whether the quantum circuit can actually be executed on the target quantum platform, which is a problem that must be solved. The other three situations are problems to be optimized.

[0038] like Figure 2 As shown, a flow chart of a local gate optimization method for quantum circuits is provided, and the method comprises the following steps: Step S1: merging adjacent local gates of the same type, where the local gates are Rx gates or Ry gates; merging adjacent local gates of the same type includes: merging multiple adjacent Rx gates of the same type, and / or merging multiple adjacent Ry gates of the same type.

[0039] Step S2: Normalize the angle value θ of the Rx gate and / or the Ry gate to the range of [0, 2π).

[0040] Step S3: Rotate the Rx gate and / or Ry gate whose angle value θ is in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π]. The rotation around the coordinate axis can be positive or negative.

[0041] In step S1, if the same type of Rx gates are adjacent, multiple adjacent Rx gates of the same type are merged into one Rx gate, and the angle of the merged Rx gate is the sum of the angles of the adjacent multiple Rx gates. If the same type of Ry gates are adjacent, multiple adjacent Ry gates of the same type are merged into one Ry gate; the angle of the merged Ry gate is the sum of the angles of the adjacent multiple Ry gates.

[0042] In step S2, if the angle value of the Ry gate is a negative angle, that is, the angle θ<0, the Ry gate is normalized to convert the Ry gate into an Ry gate with an angle θ in the range of [0, 2π). Specifically, the angle value θ is converted into an angle value θ+2kπ in the range of [0, 2π), where k is a positive integer.

[0043] In step S2, if the angle θ of the Ry gate is greater than 2π, the Ry gate is normalized and converted to an Ry gate with an angle θ in the range of [0, 2π). Specifically, the angle value θ is converted to an angle value θ-2kπ in the range of [0, 2π), where k is a positive integer.

[0044] In step S2, if the angle θ of the Rx gate is greater than 2π, the Rx gate is normalized and converted to an Rx gate with an angle θ in the range of [0, 2π). Specifically, the angle value θ is converted to an angle value θ-2kπ in the range of [0, 2π), where k is a positive integer.

[0045] In step S3, if the angle θ of the Rx gate is within the range of (π, 2π], a rotation operation is performed on the Rx gate to convert the Rx gate into an Rx gate rotated in the negative direction around the coordinate axis x by a positive angle of 2π-θ.

[0046] Alternatively, in step S3, if the angle θ of the Rx gate is within the range of (π, 2π], a rotation operation is performed on the Rx gate to convert the Rx gate into an Rx gate rotated in the positive direction around the coordinate axis x by the angle θ.

[0047] In step S3, if the angle θ of the Ry gate is within the range of (π, 2π], a rotation operation is performed on the Ry gate to convert the Ry gate into an Ry gate that is rotated in the negative direction around the coordinate axis y by a positive angle of 2π-θ.

[0048] Alternatively, in step S3, if the angle θ of the Ry gate is within the range of (π, 2π], a rotation operation is performed on the Ry gate to convert the Ry gate into an Ry gate that is rotated in the positive direction around the coordinate axis y by the angle θ.

[0049] For an Rx gate or an Ry gate, a positive rotation of an angle θ around the coordinate axis is equivalent to a negative rotation of an angle 2π-θ around the coordinate axis.

[0050] After the local gates of the target quantum circuit are optimized and converted through the above steps S1 to S3, redundant operations are simplified in the target quantum circuit, and there are no adjacent Rx gates and / or Ry gates of the same type; there are no Ry gates with negative angles, so the duration of the corresponding interaction is positive, thereby ensuring that the target quantum circuit on the target quantum platform can be executed; by selecting positive or negative rotation around the coordinate axis, the angle θ is within the range of [0, π], thereby ensuring that the duration of the interaction between the corresponding microwave or laser radiation field and the ion is the shortest.

[0051] like Figure 3 As shown, a schematic diagram of a local gate optimization device for quantum circuits is given. The local gate optimization device for quantum circuits includes: The merging unit 301 is configured to merge adjacent local gates of the same type, where the local gates are Rx gates or Ry gates; the merging of adjacent local gates of the same type includes: merging multiple adjacent Rx gates of the same type, and / or merging multiple adjacent Ry gates of the same type.

[0052] The normalization unit 302 is configured to normalize the angle value θ of the Rx gate and / or the Ry gate to a range of [0, 2π).

[0053] The rotation unit 303 is configured to rotate the Rx gate and / or the Ry gate whose angle value θ is in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π]. The rotation around the coordinate axis can be positive or negative.

[0054] The method and device for optimizing the local gates of a quantum circuit proposed in the present application can merge multiple adjacent Rx gates and / or Ry gates of the same type, and convert the rotation angle to the range of [0, π] by normalization operation and selection of positive or negative rotation around the coordinate axis. After optimizing the local gates of the quantum circuit by adopting these measures, redundant operations can be simplified to ensure that the optimized quantum circuit can be actually executed on the target platform. By simplifying the quantum circuit, the execution time is shortened and the quantum computing performance is improved.

[0055] In addition, a computer-readable storage medium storing a computer program may also be provided according to an exemplary embodiment of the present invention. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform a local gate optimization method for a quantum circuit according to an exemplary embodiment of the present invention. The computer-readable recording medium is any data storage device that can store data read out by a computer system. Examples of computer-readable recording media include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission through the Internet via a wired or wireless transmission path).

[0056] In addition, a computing device may be provided according to an exemplary embodiment of the present invention. The computing device includes a processor and a memory. The memory is used to store a computer program. The computer program is executed by the processor so that the processor executes the computer program of the local gate optimization method for quantum circuits according to an exemplary embodiment of the present invention.

[0057] It should be noted that the first, second, third, fourth, etc. in the above description are to distinguish features with the same name in the same or different embodiments, and are not quantitative limitations. And the present invention is not limited to the specific configurations and processes described above or shown in the figures. The above is only a specific embodiment of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the described system, device, module or module can refer to the corresponding process in the method embodiment without further description. It should be understood that the scope of protection of the present invention is not limited to this. Any technician familiar with the technical field can think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be covered within the scope of protection of the present invention.

Claims

1. A local gate optimization method for quantum circuits, characterized in that: include: Merging adjacent local gates of the same type, wherein the local gates are Rx gates or Ry gates; Normalize the angle value θ of the Rx gate and / or the Ry gate to the range of [0, 2π); The Rx gate and / or Ry gate with an angle value θ in the range of (π, 2π] are rotated around the corresponding coordinate axis until the angle value θ is in the range of [0, π].

2. The method according to claim 1, characterized in that The merging of adjacent similar local gates includes: merging two or more adjacent similar Rx gates into one Rx gate, and summing the angle values ​​θ of the similar Rx gates to take the angle value of the merged Rx gate.

3. The method according to claim 1, characterized in that: The merging of adjacent similar local doors includes: merging two or more adjacent similar Ry doors into one Ry door, and summing the angle values ​​θ of the similar Ry doors to take the angle value of the merged Ry door.

4. The method according to claim 1, characterized in that The step of normalizing the angle value θ of the Rx gate and / or the Ry gate to a range of [0, 2π) includes: The Ry gate with an angle value θ<0 is normalized, and the normalized angle value is converted to θ+2kπ in the range of [0, 2π), where k is a positive integer.

5. The method according to claim 1, characterized in that The step of normalizing the angle value θ of the Rx gate and / or the Ry gate to a range of [0, 2π) includes: Normalize the angle value of the Ry gate with angle value θ>2π, and convert the normalized angle value to θ-2kπ in the range of [0, 2π), where k is a positive integer; The Rx gate with angle value θ>2π is normalized, and the normalized angle value is converted to θ-2kπ in the range of [0, 2π), where k is a positive integer.

6. The method according to claim 1, characterized in that The step of rotating the Rx gate and / or the Ry gate whose angle value θ is in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π] comprises: The Rx gate with an angle value θ in the range of (π, 2π] is rotated in the negative direction by a positive angle 2π-θ around the corresponding coordinate axis, or rotated in the positive direction by an angle θ around the corresponding coordinate axis.

7. The method according to claim 1, characterized in that The step of rotating the Rx gate and / or the Ry gate whose angle value θ is in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π] comprises: The Ry gate with an angle value θ in the range of (π, 2π] is rotated in the negative direction by a positive angle 2π-θ around the corresponding coordinate axis, or rotated in the positive direction by an angle θ around the corresponding coordinate axis.

8. A local gate optimization device for quantum circuits, characterized in that: include: a merging unit, configured to merge adjacent local gates of the same type, wherein the local gates are Rx gates or Ry gates; a normalization unit configured to normalize the angle value θ of the Rx gate and / or the Ry gate to a range of [0, 2π); The rotation unit is configured to rotate the Rx gate and / or the Ry gate whose angle value θ is in the range of (π, 2π] around the corresponding coordinate axis until the angle value θ is in the range of [0, π].

9. A computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, the local gate optimization method for a quantum circuit according to any one of claims 1 to 7 is implemented.

10. A computing device comprising: processor; A memory storing a computer program, which, when executed by a processor, implements the local gate optimization method for a quantum circuit according to any one of claims 1 to 7.