Optimization method of Shor's algorithm based on controlled exchange gate

By replacing the modular exponential operator in Shor's algorithm with a controlled exchange gate and performing group merging processing, the quantum circuit is optimized, the performance limitation of quantum computers in prime factorization is solved, and the computing efficiency and accuracy are improved.

CN120354961BActive Publication Date: 2025-09-16中电信量子信息科技集团有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510861253.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-16
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

Current quantum computers find it difficult to effectively solve the highly complex prime factorization problem. Due to factors such as the limited number of quantum bits, short coherence time, and high gate operation error rate, the calculation results of the Shor algorithm are prone to errors in practical applications.

Method used

By replacing the modular exponential operator in Shor's algorithm with a controlled exchange gate and grouping and merging the controlled exchange gates, the quantum circuit is optimized, and the depth of the quantum circuit and the number of required quantum bits are reduced.

Benefits of technology

The optimized Shor algorithm can operate within the performance limitations of quantum computers, improving the efficiency and accuracy of prime factorization and promoting larger-scale experiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354961B_ABST
    Figure CN120354961B_ABST
Patent Text Reader

Abstract

This application discloses a method for optimizing the Shor algorithm based on controlled exchange gates. The method includes: determining an initial quantum circuit based on the target problem to be solved, based on the Shor algorithm. Next, converting the modular exponential operator in the initial quantum circuit into a controlled exchange gate to determine a first quantum circuit. Finally, grouping and merging the controlled exchange gates in the first quantum circuit to determine a first target quantum circuit for optimizing the Shor algorithm. By replacing the modular exponential operator with a controlled exchange gate and grouping and merging the controlled exchange gates, the quantum circuit depth and the number of qubits required for the Shor algorithm are reduced, thereby breaking through the performance limitations of current quantum computers and promoting larger-scale real-machine experiments using the Shor algorithm.
Need to check novelty before this filing date? Find Prior Art

Claims

1. An optimization method of Shor's algorithm based on controlled exchange gate, characterized in that: The method comprises: Based on the Shor algorithm, an initial quantum circuit is determined according to the target problem to be processed; converting a modular exponential operator in the initial quantum circuit into a controlled exchange gate to determine a first quantum circuit; performing grouping and merging processing on the controlled switching gates in the first quantum circuit to determine a first target quantum circuit to optimize the Shor algorithm; The grouping and merging of the controlled switching gates in the first quantum circuit to determine the first target quantum circuit includes: performing grouping processing on the controlled switching gates in the first quantum circuit based on a preset grouping rule to determine a first temporary quantum circuit, wherein the first temporary quantum circuit includes at least one group of target controlled switching gates having different control bits and the same controlled bits; Determining target quantum gate information and a second temporary quantum circuit according to the first temporary quantum circuit; The first target quantum circuit is determined according to the target quantum gate information and the second temporary quantum circuit.

2. The method according to claim 1, characterized in that The method of determining an initial quantum circuit based on the Shor algorithm and the target problem to be processed includes: Based on the Shor algorithm and the target problem, determining a basis, where the basis is coprime to the integer to be decomposed in the target problem and is smaller than the integer to be decomposed; Determining the number of phase qubits according to the target problem, wherein the number of phase qubits is used to record phase information generated by running the Shor algorithm; Determining the number of operation qubits according to the target problem, where the number of operation qubits is used to record quantum state information generated by running the modular exponential operator; The initial quantum circuit is determined according to the basis, the number of phase quantum bits, and the number of operation quantum bits.

3. The method according to claim 2, characterized in that The determining of the initial quantum circuit according to the basis, the number of phase qubits, and the number of operation qubits includes: Determining the modular exponential operator according to the basis, the number of phase qubits, and the integer to be decomposed; The initial quantum circuit is determined according to the basis, the number of phase quantum bits, the number of operation quantum bits, and the modular exponential operator.

4. The method according to claim 1, wherein The determining, according to the first temporary quantum circuit, target quantum gate information and a second temporary quantum circuit includes: Based on a preset merging rule, the target controlled switching gates are merged to determine the target quantum gate information and the second temporary quantum circuit.

5. The method according to claim 1, wherein The determining the first target quantum circuit according to the target quantum gate information and the second temporary quantum circuit includes: Based on a preset decomposition rule, the quantum gate in the target quantum gate information is decomposed to determine the first target quantum circuit.

6. The method according to claim 1, characterized in that The method further comprises: performing identification processing on the first target quantum circuit to determine the existence of a first circuit property of the first target quantum circuit; determining a second quantum circuit based on the existence of the first circuit property; A second target quantum circuit is determined based on the second quantum circuit to optimize the Shor algorithm.

7. The method according to claim 6, characterized in that The first circuit properties include controlled non-gate symmetry, controlled bit reciprocity, operation commutativity, and operation determinism. Determining the second quantum circuit based on the existence of the first circuit properties includes: In a case where the first target quantum circuit has the controlled NOT gate symmetry, the controlled bit reciprocity, and the operational commutativity, adjusting the controlled NOT gate in the first target quantum circuit based on the controlled NOT gate symmetry, the controlled bit reciprocity, and the operational commutativity to determine the second quantum circuit; or In a case where the first target quantum circuit has the operational certainty, the first target quantum circuit is optimized based on the operational certainty to determine the second quantum circuit.

8. The method according to claim 6, characterized in that The determining of the second quantum circuit according to the existence of the first circuit property includes: In a case where the first circuit property does not exist, the first target quantum circuit is determined to be the second target quantum circuit.

9. The method according to claim 6, characterized in that Determining a second target quantum circuit based on the second quantum circuit to optimize the Shor algorithm includes: performing identification processing on the second quantum circuit to determine the existence of the second circuit property of the second quantum circuit; determining a second quantum circuit according to the existence of the second circuit property; A second target quantum circuit is determined based on the second quantum circuit to optimize the Shor algorithm.

Citation Information

Patent Citations

  • Resource estimation method and system for quantum program

    CN117744825A