Decomposition Method, Device, Equipment and Medium for Multi-Controlled Quantum Phase-Shift Gate
Decomposing multi-control quantum phase shift gates into optimized quantum circuits with controlled quantum phase shift gates and CNOT gates addresses the resource demand challenge, improving computational efficiency and practicality in quantum computing.
Patent Information
- Application Number
- CN202510281711.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-03-11
AI Technical Summary
In the prior art, the decomposition process of multi-controlled quantum gates leads to an exponential increase in the number of quantum gates and line depth, which is difficult to effectively implement in noise-containing medium-scale quantum computers, and becomes a bottleneck in the practical use of quantum computing.
The multi-controlled quantum phase shifting gate is decomposed into n-1 quantum circuits, and a controlled quantum gate and a CNOT gate are configured. The control bits and target bits are arranged according to specific rules. The controlled quantum phase shifting gate and its conjugated transposition are alternately used, which simplifies the quantum circuit structure and reduces the number of quantum gates and the depth of the line.
The modular decomposition of multi-controlled quantum phase shifting gates is realized, the quantum circuit structure is simplified, the number of quantum gates and line depth is reduced, and the efficiency and achievability of quantum computing is improved, especially in complex quantum computing, which provides significant performance advantages.
Smart Images

Figure CN119808980B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum computing technology, and particularly to a decomposition method, device, computing device, and computer-readable storage medium for a multi-controlled quantum phase shift gate. Background Art
[0002] Quantum algorithms are advanced computing algorithms based on the principles of quantum mechanics. Their core utilizes characteristics such as quantum superposition and quantum entanglement, and can exhibit performance superior to classical algorithms in specific computing tasks. For example, the Shor algorithm demonstrates the potential of quantum computing in the field of cryptography through efficient large-number prime factorization, while the Grover algorithm shows its computational advantage in solving specific problems through rapid search of an unordered database. The emergence of these quantum algorithms not only reveals the powerful capabilities of quantum computing but also provides an important direction for the development of future computing technologies.
[0003] In quantum computing, the quantum circuit model is the basic framework for describing and implementing quantum algorithms. The quantum circuit model consists of quantum bits and quantum logic gates (abbreviated as quantum gates). Common quantum gates include the Hadamard gate for generating superposition states and the CNOT gate for generating entangled states. Different from classical circuits that transmit signals through metal wires, quantum circuits connect each component through time evolution, and the state of quantum bits changes when passing through quantum gate operations. Quantum gate operations are essentially a process in which a unitary matrix acts on quantum bits. Therefore, the entire quantum circuit can be regarded as a complex unitary matrix composed of multiple unitary matrices. This model greatly simplifies the design and implementation of quantum algorithms, facilitating the decomposition of complex quantum operations into a series of simple operations.
[0004] However, in actual quantum computers, there may be significant hardware challenges in implementing some complex quantum gates. For this reason, it is necessary to decompose these complex quantum gates into sequences composed of basic quantum gates (such as single-qubit gates and two-qubit gates). This decomposition not only reduces the hardware requirements and implementation difficulty but also improves the efficiency and accuracy of quantum computing. However, the decomposition process of multi-controlled quantum gates (such as multi-controlled quantum gates with n - 1 control bits) will cause the number of quantum gates to increase exponentially. For a multi-controlled quantum gate with multiple control bits, the number of quantum gates and the circuit depth required for its decomposition result will increase rapidly. For example, decomposing a multi-controlled quantum gate with 4 control bits (C^{4}) requires 213 quantum gates and the circuit depth is 149; while decomposing a multi-controlled quantum gate with 5 control bits (C^{5}) requires 1429 quantum gates and the circuit depth is as high as 959. This exponential resource consumption makes it extremely complex to implement multi-controlled quantum gates in noisy intermediate-scale quantum (NISQ) computers, becoming an important technical bottleneck on the road to the practical application of quantum computing.
[0005] Therefore, how to effectively decompose multi-controlled quantum gates to reduce the demand for hardware resources while improving the implementation efficiency of quantum computing has become an important direction in quantum computing research. Such research can not only promote the practical application of quantum computing but also lay a foundation for its application in more fields. Summary of the Invention
[0006] Aiming at the technical problems existing in the prior art, this application proposes a decomposition method for multi-controlled quantum phase shift gates. The method includes: decomposing the multi-controlled quantum phase shift gate C^{n - 1}PS(θ) into n - 1 blocks of quantum circuits, where the n - 1 blocks of quantum circuits are connected end to end from left to right. Here, n is the total number of qubits on which the multi-controlled quantum phase shift gate acts, and n ≥ 3; configuring 2 x-1 controlled quantum gates in the x-th block of quantum circuits. The control bits of the controlled quantum gates are arranged on the x-th qubit, and the target bits are arranged on the n-th qubit. Among them, the controlled quantum phase shift gates and the conjugate transposes of the controlled quantum phase shift gates in the controlled quantum gates are arranged alternately, and the value range of x is from 1 to n - 1; configuring 2 x-1 CNOT gates in the x-th block of quantum circuits. Among them, 0 CNOT gates are configured in the first block of quantum circuits, and the CNOT gates and the controlled quantum gates are arranged alternately; among them, the first 2 x-2 CNOT gates and the last 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged in the same way. The target bits of the first 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged on the x-th qubit, and the qubits where the control bits are located are arranged in the order of high-order bits to low-order bits and then to high-order bits from left to right in sequence.
[0007] For the method as described above, the control bits of the first 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged between the (x - 1)-th qubit and the 1st qubit.
[0008] For the method as described above, when n is less than or equal to 5, the target bits of the first 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged on the x-th qubit, and the control bits start from the (x - 1)-th qubit and gradually decrease to the 1st qubit from left to right and then gradually increase to the (x - 1)-th qubit until the 2 x-2 CNOT gates are arranged completely.
[0009] For the method as described above, when n is equal to 6, the target bits of the first 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged on the x-th qubit, and the control bits start from the (x - 1)-th qubit and gradually decrease to the 1st qubit from left to right and then gradually increase to the (x - 2)-th qubit until the 2 x-2One CNOT gate is arranged.
[0010] For the method as described above, the phase shift angle of the controlled quantum gate is related to the number of qubits n and the phase shift angle θ in the multi-controlled quantum phase shift gate C^{n - 1}PS(θ).
[0011] For the method as described above, the phase shift angle of the controlled quantum gate is θ / 2 n-2 .
[0012] According to another aspect of the present application, a decomposition device for a multi-controlled quantum phase shift gate is proposed, including: a decomposition module for decomposing the multi-controlled quantum phase shift gate C^{n - 1}PS(θ) into n - 1 blocks of quantum circuits, the n - 1 blocks of quantum circuits being connected end to end from left to right, where n is the total number of qubits on which the multi-controlled quantum phase shift gate acts, and n ≥ 3; a first configuration module for configuring 2 x-1 controlled quantum gates in the x-th block of quantum circuits, the control bits of the controlled quantum gates being arranged on the x-th qubit, and the target bits being arranged on the n-th qubit, wherein the controlled quantum phase shift gates and the conjugate transposes of the controlled quantum phase shift gates in the controlled quantum gates are arranged alternately, and the value range of x is from 1 to n - 1; a second configuration module for configuring 2 x-1 CNOT gates in the x-th block of quantum circuits, wherein 0 CNOT gates are configured in the first block of quantum circuits, and the CNOT gates and the controlled quantum gates are arranged alternately; wherein the first 2 x-2 CNOT gates and the last 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged in the same way, and the target bits of the first 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged on the x-th qubit, and the qubits where the control bits are located are arranged in the order of high-order bits to low-order bits and then to high-order bits from left to right in sequence.
[0013] According to another aspect of the present application, a computing device is proposed, including: a processor; a memory storing a computer program, which when executed by the processor, implements the decomposition method for the multi-controlled quantum phase shift gate as described above.
[0014] According to another aspect of the present application, a computer-readable storage medium is proposed, in which computer instructions are stored, and when the computer instructions are executed by the processor, the decomposition method for the multi-controlled quantum phase shift gate as described above is implemented.
[0015] Through the above decomposition method, the present application realizes the modular decomposition of the multi-controlled quantum phase shift gate. While ensuring the accuracy of the decomposition, this decomposition method also simplifies the structure of the quantum circuit after decomposition, that is, reduces the number of quantum gates and the circuit depth, improves the efficiency of the quantum circuit, optimizes the feasibility of operations, and particularly provides significant performance advantages in complex quantum computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Next, the preferred embodiments of the present application will be further described in detail with reference to the accompanying drawings, where:
[0017] Figure 1 FIG. is a flowchart of a method for decomposing a multi-controlled quantum phase shift gate according to an embodiment of the present application.
[0018] Figure 2 FIG. is a decomposed quantum circuit diagram of a two-controlled quantum phase shift gate according to an embodiment of the present application.
[0019] Figure 3 FIG. is a decomposed quantum circuit diagram of a three-controlled quantum phase shift gate according to an embodiment of the present application.
[0020] Figure 4 FIG. is a decomposed quantum circuit diagram of a four-controlled quantum phase shift gate according to an embodiment of the present application.
[0021] Figure 5 FIG. is a decomposed quantum circuit diagram of a five-controlled quantum phase shift gate according to an embodiment of the present application.
[0022] Figure 6 FIG. is a decomposition device of a multi-controlled quantum phase shift gate according to an embodiment of the present application.
[0023] Figure 7 FIG. is a structural principle block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.
[0025] In the following detailed description, reference may be made to the various specification drawings that form a part of this application and illustrate specific embodiments of the application. In the drawings, like reference numerals describe generally similar components in different figures. The specific embodiments of this application are described in sufficient detail below so that those of ordinary skill in the relevant art and technology can implement the technical solutions of this application. It should be understood that other embodiments may also be utilized or structural, logical, or electrical changes may be made to the embodiments of this application.
[0026] The multi-controlled quantum phase shift gate (Multi-controlled Quantum PhaseShift gate, abbreviated as C^{n - 1}PS) of this application is a very common and important n-qubit gate in implementing quantum algorithms. It can be written as C^{n - 1}PS(theta), that is, when the current n - 1 control qubits are all 1, the PS(theta) gate is executed on the last target qubit. Among them, n is the total number of qubits on which the multi-controlled quantum phase shift gate acts. For example, when n = 1, it is denoted as PS(theta), that is, it acts on a single qubit. When n = 2, it is denoted as CPS(theta), that is, it acts on two qubits. When n = 3, it is denoted as C^{2}PS(theta), that is, it acts on three qubits. Among them, PS(theta)=diag[1,e^{i theta}], and i is the imaginary unit, theta is the parameter that the PS gate needs to input, and diag represents a diagonal matrix.
[0027] The multi-controlled quantum gate of this application is a multi-controlled quantum phase shift gate. Compared with other multi-controlled quantum gates, the multi-controlled quantum phase shift gate has the following characteristics:
[0028] Simplification of power operations: For general multi-controlled quantum gates, it is often difficult to calculate the analysis of their power operations, especially when the power is relatively high. For example, finding the square root or high-order power of a matrix may require complex operations. However, for the multi-controlled quantum phase shift gate, due to its special diagonal matrix form, the gate operation parameters can be quickly determined through the decomposition law of power exponents (such as the power exponent addition rule). This characteristic makes the multi-controlled quantum phase shift gate show unique advantages in the power operation scenario;
[0029] The simple structure of the diagonal matrix: The multi-controlled quantum phase shift gate is represented in the form of a diagonal matrix, and its matrix has non-zero values only on the diagonal. This structure greatly simplifies the computational complexity and at the same time avoids the additional interference brought by non-diagonal elements. The characteristics of the diagonal matrix enable the multi-controlled quantum phase shift gate to better meet the implementation requirements in the noisy intermediate-scale quantum (NISQ) computing environment;
[0030] Simplification and accessibility of parameters: The key feature of the multi-controlled quantum phase shift gate lies in the resolvability of its parameters. When the phase shift parameter of the CPS gate (such as θ) is known, the corresponding gate matrix can be directly calculated through simple mathematical relationships. Compared with other multi-controlled quantum gates that require complex matrix operations, the parameter acquisition of the multi-controlled quantum phase shift gate is more intuitive and efficient.
[0031] Figure 1 is a flowchart of a method for decomposing a multi-controlled quantum phase shift gate according to an embodiment of the present application. As Figure 1 shown, the method includes:
[0032] Step S110, decomposing the multi-controlled quantum phase shift gate C^{n - 1}PS(θ) into n - 1 blocks of quantum circuits, where the n - 1 blocks of quantum circuits are connected end to end from left to right, n is the total number of qubits on which the multi-controlled quantum phase shift gate acts, and n ≥ 3;
[0033] Step S120, configuring 2 x-1 controlled quantum gates in the x-th block of quantum circuits, where the control bits of the controlled quantum gates are arranged on the x-th qubit, and the target bits are arranged on the n-th qubit. Among them, the controlled quantum phase shift gates and the conjugate transposes of the controlled quantum phase shift gates in the controlled quantum gates are arranged alternately, and the value range of x is from 1 to n - 1;
[0034] Step S130, configuring 2 x-1 CNOT gates in the x-th block of quantum circuits. Among them, 0 CNOT gates are configured in the first block of quantum circuits, and the CNOT gates and the controlled quantum gates are arranged alternately;
[0035] Among them, the first 2 x-2 CNOT gates and the last 2 x-2 CNOT gates in the x-th quantum circuit segment are arranged in the same way. The target bits of the first 2 x-2 CNOT gates in the x-th quantum circuit segment are arranged on the x-th qubit, and the qubits where the control bits are located are arranged in the order of high-order bits to low-order bits and then to high-order bits from left to right in sequence.
[0036] As can be seen from the above, each block of quantum circuits in the present application is composed of controlled quantum phase shift gates and / or CNOT gates. The multi-block quantum circuits are connected end to end from left to right and executed in the order from number 1 to x. The qubits in the quantum circuits are arranged in the order of qubits 1 to n from top to bottom, and the qubits increase gradually from low-order bits to high-order bits from top to bottom.
[0037] The control bit and the target bit of a quantum gate are important components for implementing specific quantum operations. They respectively determine how the quantum gate responds and which qubits it acts on. The control bit is the qubit used to activate the action of the quantum gate. When the control bit is in a specific state (usually ∣1>), the operation of the quantum gate will act on the target bit. If the control bit is in ∣0>, the operation of the quantum gate will not be activated and the target bit remains unchanged. The target bit is the qubit acted on by the quantum gate, and its state changes according to the function of the quantum gate and the state of the control bit.
[0038] Through the above decomposition method, the present application realizes the modular decomposition of the multi-controlled quantum phase shift gate. This decomposition method not only ensures the accuracy of the decomposition, but also simplifies the structure of the quantum circuit after decomposition, that is, reduces the number of quantum gates and the circuit depth, improves the efficiency of the quantum circuit, optimizes the realizability of the operation, and particularly provides significant performance advantages in complex quantum computing.
[0039] According to an embodiment of the present application, the control bits of the first 2 x-2 CNOT gates in the x-th block of the quantum circuit are arranged between the (x - 1)-th qubit and the 1st qubit. In the x-th block of the quantum circuit, the control bits of the first 2 x-2 CNOT gates are arranged between the 1st and (x - 1)-th qubits in the order from the high-order bit to the low-order bit and then to the high-order bit, ensuring that the interoperability between qubits can be accurately implemented.
[0040] Further, when n is less than or equal to 5, the target bits of the first 2 x-2 CNOT gates in the x-th block of the quantum circuit are arranged at the x-th qubit. The control bits start from the (x - 1)-th qubit and decrease sequentially from left to right to the 1st qubit and then increase to the (x - 1)-th qubit until the 2 x-2 CNOT gates are arranged.
[0041] When n is equal to 6, the target bits of the first 2 x-2 CNOT gates in the x-th block of the quantum circuit are arranged at the x-th qubit. The control bits start from the (x - 1)-th qubit and decrease sequentially from left to right to the 1st qubit and then increase to the (x - 2)-th qubit until the 2 x-2 CNOT gates are arranged.
[0042] In the above decomposition scheme, for different numbers of multi-controlled quantum phase shift gates, the allocation rules of the control gates and target bits of the CNOT gates are proposed, which can minimize the circuit depth and the number of gates. Whether n ≤ 5 or n = 6, the core logic of the decomposition of the multi-controlled quantum phase shift gate can be realized in a simple way.
[0043] According to an embodiment of the present application, the phase shift angle of the controlled quantum gate is related to the number of qubits n and the phase shift angle θ in the multi-controlled quantum phase shift gate C^{n-1}PS(θ). Further, the phase shift angle of the controlled quantum gate is θ / 2 n-2 . Wherein, a phase shift angle of θ / 2 is applied to both the controlled quantum phase shift gate and its conjugate transpose in the controlled quantum gate to ensure the correct overall operation of the circuit n-2 .
[0044] The implementation manners and advantages brought by the embodiments of the present application are described above through multiple embodiments. The present application describes the specific processing procedures of the embodiments of the present application in detail with specific examples. Generally speaking, when considering quantum gate decomposition, complex quantum gates need to be decomposed into single-qubit gates or two-qubit gates. Therefore, quantum gates with more than 3 qubits, that is, n≥3, are usually decomposed to simplify the operation and improve the calculation efficiency
[0045] Figure 2 is the decomposed quantum circuit diagram of the two-controlled quantum phase shift gate according to an embodiment of the present application. As Figure 2 shown, the two-controlled quantum phase shift gate C^{2}U (n = 3) is decomposed into the quantum circuit diagram on the right side according to the decomposition method of Figure 1 . In the quantum circuit diagram on the Figure 2 right side, there are 2 blocks of quantum circuits, namely the first block of quantum circuit and the second block of quantum circuit. The first block of quantum circuit diagram includes 1 controlled quantum gate, the control bit of which is arranged on the first qubit, and the target bit is arranged on the third qubit. This controlled quantum gate is the controlled quantum phase shift gate V. When the two-controlled quantum phase shift gate U = PS(θ), the controlled quantum phase shift gate V = PS(θ / 2)
[0046] The second block of quantum circuit diagram includes 2 controlled quantum gates, the control bits of which are arranged on the second qubit, and the target bits are arranged on the third qubit. The 2 controlled quantum gates are the controlled quantum phase shift gate V and the conjugate transpose V † of the controlled quantum phase shift gate respectively. The controlled quantum phase shift gate V and its conjugate transpose V † are arranged alternately. When the two-controlled quantum phase shift gate U = PS(θ), the controlled quantum gate V and its conjugate transpose V † = PS(θ / 2)
[0047] The second block of quantum circuit diagram includes 2 CNOT gates. The CNOT gates are arranged alternately with the controlled quantum gates. The control bits of the 2 CNOT gates are both arranged on the first qubit, and the target bits are both arranged on the second qubit
[0048] Figure 3It is the decomposed quantum circuit diagram of a three - controlled quantum phase - shift gate according to an embodiment of the present application. As Figure 3 shown, according to the Figure 1 decomposition method, the three - controlled quantum phase - shift gate \(C^{3}W(n = 4)\) is decomposed into the quantum circuit diagram on the right side of the figure. The quantum circuit diagram on the right side of the figure includes three blocks of quantum circuits, namely the first block of quantum circuit, the second block of quantum circuit, and the third block of quantum circuit. The structural arrangements in the first and second blocks of quantum circuits are the same as those of Figure 2 , which will not be elaborated here. When the three - controlled quantum phase - shift gate \(W=PS(\theta)\), then the controlled quantum gates (K or K † ) in the first and second blocks of quantum circuits \(=PS(\theta / 4)\).
[0049] The third block of quantum circuit diagram includes four controlled quantum gates. The control bits of the controlled quantum gates are arranged on the third qubit, and the target bits are arranged on the fourth qubit. The four controlled quantum gates include two controlled quantum phase - shift gates K and two conjugate transposes K † of the controlled quantum phase - shift gates, and the controlled quantum phase - shift gates K and their conjugate transposes K † are arranged alternately. When the three - controlled quantum phase - shift gate \(W = PS(\theta)\), then the controlled quantum gates (K or K † ) \(=PS(\theta / 4)\).
[0050] The third block of quantum circuit diagram includes four CNOT gates. The CNOT gates and the controlled quantum gates are arranged alternately, and the arrangement methods of the first two CNOT gates are the same as those of the last two CNOT gates. The control bits of the first two CNOT gates are arranged on the second qubit and the first qubit in sequence from left to right, and the target bits are all arranged on the third qubit.
[0051] Figure 4 It is the decomposed quantum circuit diagram of a four - controlled quantum phase - shift gate according to an embodiment of the present application. As Figure 4 shown, according to the Figure 1 decomposition method, the four - controlled quantum phase - shift gate \(C^{4}A(n = 5)\) is decomposed into the quantum circuit diagram on the right side of the figure. The quantum circuit diagram on the right side of the figure includes four blocks of quantum circuits, namely the first block of quantum circuit, the second block of quantum circuit, the third block of quantum circuit, and the fourth block of quantum circuit. The structural arrangements in the first, second, and third blocks of quantum circuits are the same as those of Figure 3 , which will not be elaborated here. When the four - controlled quantum phase - shift gate \(A = PS(\theta)\), then the controlled quantum gates (B or B † ) in the first, second, and third blocks of quantum circuits \(=PS(\theta / 8)\).
[0052] The fourth quantum circuit diagram includes 8 controlled quantum gates. The control bits of the controlled quantum gates are arranged on the 4th qubit, and the target bits are arranged on the 5th qubit. The 8 controlled quantum gates include 4 controlled quantum phase shift gates B and the conjugate transpose B of 4 controlled quantum phase shift gates † , the controlled quantum phase shift gate B and its conjugate transpose B † are arranged alternately. When the four-controlled quantum phase shift gate A = PS(θ), then the controlled quantum gate (B or B † ) = PS(θ / 8).
[0053] The fourth quantum circuit diagram includes 8 CNOT gates. The CNOT gates and the controlled quantum gates are arranged alternately. Among them, the arrangement methods of the first 4 CNOT gates and the last 4 CNOT gates are the same. The control bits of the first 4 CNOT gates are arranged in the order from high-bit qubits to low-bit qubits and then to high-bit qubits from left to right, that is, arranged on the 3rd qubit, the 2nd qubit, the 1st qubit, and the 2nd qubit from left to right in turn, and the target bits are all arranged on the 4th qubit.
[0054] Figure 5 is the decomposed quantum circuit diagram of a five-controlled quantum phase shift gate according to an embodiment of the present application. As Figure 5 shown, the four-controlled quantum phase shift gate C^{5}D (n = 6) is decomposed into the quantum circuit diagram on the right side of the figure according to Figure 1 the decomposition method. The quantum circuit diagram on the right side of the figure includes 5 blocks of quantum circuits, namely the first block of quantum circuit, the second block of quantum circuit, the third block of quantum circuit, the fourth block of quantum circuit, and the fifth block of quantum circuit. The structural arrangements in the first, second, third, and fourth blocks of quantum circuits are the same as Figure 4 , and will not be elaborated here. When the five-controlled quantum phase shift gate D = PS(θ), then the controlled quantum gates (E or E † ) in the first, second, third, and fourth blocks of quantum circuits = PS(θ / 16).
[0055] The fifth quantum circuit diagram includes 16 controlled quantum gates. The control bits of the controlled quantum gates are arranged on the 5th qubit, and the target bits are arranged on the 6th qubit. The 16 controlled quantum gates include 8 controlled quantum phase shift gates E and the conjugate transpose E of 8 controlled quantum phase shift gates † , the controlled quantum phase shift gate E and its conjugate transpose E † are arranged alternately. When the five-controlled quantum phase shift gate D = PS(θ), then the controlled quantum gate (E or E † ) = PS(θ / 16).
[0056] The fifth quantum circuit diagram includes 16 CNOT gates, and the CNOT gates are arranged alternately with the controlled quantum gates. Among them, the arrangement of the first 8 CNOT gates is the same as that of the last 8 CNOT gates, and the control bits of the first 8 CNOT gates are arranged in the order of from high - order bit to low - order bit and then to high - order bit from left to right. At the same time, its specific arrangement is slightly different from that of the fourth block. The control bits of the first 8 CNOT gates are arranged on the 4th qubit, 3rd qubit, 2nd qubit, 1st qubit, 2nd qubit, 3rd qubit, 2nd qubit, 1st qubit from left to right in sequence, and the target bits are all arranged on the 5th qubit.
[0057] Reference Figure 4 and Figure 5 As shown, by sequentially executing the quantum gates on the right - hand side of the equal sign in order, the quantum gates on the left - hand side can be realized. Compared with the conventional decomposition algorithm, this algorithm can greatly reduce the resource consumption. Specifically, when decomposing a four - controlled quantum phase - shift gate, the conventional algorithm requires 213 quantum gates and the circuit depth is 149, while only 29 two - qubit gates need to be executed at this time, and the circuit depth is only 29. When decomposing a five - controlled quantum phase - shift gate, the conventional algorithm requires 1429 quantum gates and the circuit depth is 959, while only 61 two - qubit gates need to be executed at this time, and the circuit depth is only 61. This decomposition method not only ensures the correctness of the decomposition, but also due to its simplicity and low circuit depth, it is easier to be implemented in physical experiments, making it easier to execute quantum algorithms on NISQ computers, thus contributing to promoting the practical application and optimization of quantum computing.
[0058] To verify the correctness of the technical solution of this application, when n - 1 = 4 and 5, this application uses the quantum computing software MindQuantum to simulate and implement the technical solution of this application. The results show that the simulation results are completely consistent with the theoretical results, further proving the feasibility and effectiveness of the technical solution of this application. And this solution highlights the importance of quantum gate decomposition, providing valuable inspiration for further exploring the implementation of various quantum algorithms using quantum gate decomposition.
[0059] Figure 6 is a decomposition device for a multi - controlled quantum phase - shift gate according to an embodiment of this application. The decomposition device 100 includes:
[0060] A decomposition module 110, configured to decompose the multi - controlled quantum phase - shift gate \(C^{n - 1}PS(\theta)\) into \(n - 1\) blocks of quantum circuits, and the \(n - 1\) blocks of quantum circuits are connected end - to - end from left to right, where \(n\) is the total number of qubits on which the multi - controlled quantum phase - shift gate acts, and \(n\geq3\);
[0061] A first configuration module 120, configured to configure 2 in the \(x\) - th block of quantum circuits x-1One controlled quantum gate, where the control bit of the controlled quantum gate is arranged on the x-th qubit, and the target bit is arranged on the n-th qubit. Among them, the controlled quantum phase shift gates and the conjugate transposes of the controlled quantum phase shift gates in the controlled quantum gate are arranged alternately, and the value range of x is from 1 to n - 1;
[0062] The second configuration module 130 is used to configure 2 x-1 CNOT gates in the x-th block of quantum circuits. Among them, 0 CNOT gates are configured in the first block of quantum circuits, and the CNOT gates and the controlled quantum gates are arranged alternately;
[0063] Among them, the arrangement modes of the first 2 x-2 CNOT gates and the last 2 x-2 CNOT gates in the x-th block of quantum circuits are the same. The target bits of the first 2 x-2 CNOT gates in the x-th block of quantum circuits are arranged on the x-th qubit, and the qubits where the control bits are located are arranged in the order from the high-order bit to the low-order bit and then to the high-order bit from left to right.
[0064] On the other hand, the present application also provides a computing device. Refer to Figure 7 , Figure 7 which is a structural principle block diagram of a computing device according to an embodiment of the present application. As Figure 7 shown, the computing device includes a processor 601 and a memory 602 storing computer program instructions; when the processor 601 executes the computer program instructions, the decomposition method for multi-controlled quantum phase shift gates in the foregoing embodiments is implemented.
[0065] Specifically, the processor 601 may include a central processing unit (CPU) or a graphics processing unit (GPU), or an application specific integrated circuit (ASIC), or may be one or more integrated circuits configured to implement the embodiments of the present application. The memory 602 may include a memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, a universal serial bus (USB) drive, or other physical / tangible memory storage devices. Additionally, the memory 602 includes removable or non-removable (or fixed) media. Further, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid state memory. In other words, generally, the memory 602 includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with executable instructions, and when the stored executable instructions are executed by the processor 601 (such as by one or more processors), the decomposition method for a multi-controlled quantum phase shift gate in the embodiments of the present application can be implemented.
[0066] In one example, Figure 7 The illustrated electronic device may further include a communication interface 603 and a bus 610. Among them, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 to complete communication with each other. The communication interface 603 is mainly used to implement communication between various modules, devices, units, and / or devices in the electronic device.
[0067] The bus 610 includes hardware, software, or both, and can couple the components of the online data flow charging device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industry standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable buses. The bus 610 may include one or more buses. Although the embodiments of the present application describe or illustrate a specific bus, the embodiments of the present application may consider any suitable bus or interconnect method.
[0068] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing decomposition method for a multi-controlled quantum phase shift gate is implemented.
[0069] The flowcharts and / or block diagrams of the methods and systems of the embodiments of the present application are described above by way of example, and the relevant aspects are described. It should be understood that each block in the flowchart and / or block diagram, or a combination thereof, can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to form a machine such that these instructions executed by such a processor enable the implementation of the specified function / action in each block or combination of blocks in the flowchart and / or block diagram. Such a processor can be a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit.
[0070] The functional blocks shown in the structural block diagrams of the embodiments of the present application can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc.; when implemented in software, it is a program or code segment for performing the required tasks. The program or code segment can be stored in a memory, or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0071] The above embodiments are only for illustrating the present application and are not intended to limit the present application. Those of ordinary skill in the relevant technical field can make various changes and modifications without departing from the scope of the present application. Therefore, all equivalent technical solutions should also fall within the scope of the disclosure of the present application.
Claims
1. A decomposition method for a multi-controlled quantum phase shift gate, characterized in that, The method includes: Decompose the multi-controlled quantum phase shift gate C^{n - 1}PS(θ) into n - 1 blocks of quantum circuits, where the n - 1 blocks of quantum circuits are connected end to end from left to right, n is the total number of qubits on which the multi-controlled quantum phase shift gate acts, n ≥ 3, and θ is the phase shift angle; Configure 2 in the x-th quantum circuit block x-1 controlled quantum gates, where the control bits of the controlled quantum gates are arranged in the x-th qubit, and the target bits are arranged in the n-th qubit. Among them, the controlled quantum phase shift gates and the conjugate transposes of the controlled quantum phase shift gates in the controlled quantum gates are arranged alternately, and the value range of x is from 1 to n - 1; Configure 2 in the x-th quantum circuit block x-1 CNOT gates, where 0 CNOT gates are configured in the first quantum circuit block, and the CNOT gates are arranged alternately with the controlled quantum gates; Among them, the first 2 CNOT gates in the x-th quantum circuit and the last 2 CNOT gates are arranged in the same way. The target bits of the first 2 CNOT gates in the x-th quantum circuit are arranged in the x-th qubit, and the qubits where the control bits are located are arranged in the order from the high-order bit to the low-order bit and then to the high-order bit from left to right. x-2 The first 2 CNOT gates and the last 2 CNOT gates are arranged in the same way. x-2 Among them, the first 2 CNOT gates in the x-th quantum circuit and the last 2 CNOT gates are arranged in the same way. The target bits of the first 2 CNOT gates in the x-th quantum circuit are arranged in the x-th qubit, and the qubits where the control bits are located are arranged in the order from the high-order bit to the low-order bit and then to the high-order bit from left to right. x-2 Among them, the first 2 CNOT gates in the x-th quantum circuit and the last 2 CNOT gates are arranged in the same way. The target bits of the first 2 CNOT gates in the x-th quantum circuit are arranged in the x-th qubit, and the qubits where the control bits are located are arranged in the order from the high-order bit to the low-order bit and then to the high-order bit from left to right.
2. The method according to claim 1, wherein The control bits of the first 2 x-2 CNOT gates in the x-th quantum circuit are arranged between the (x - 1)-th qubit and the 1st qubit.
3. The method according to claim 1, wherein When n is less than or equal to 5, the target bits of the first 2 x-2 CNOT gates in the x-th quantum circuit are arranged at the x-th qubit, and the control bits start from the (x - 1)-th qubit and decrease sequentially from left to right to the 1st qubit and then increase to the (x - 1)-th qubit until 2 x-2 CNOT gates are arranged.
4. The method according to claim 1, wherein When n is equal to 6, the target bits of the first 2 x-2 CNOT gates in the x-th quantum circuit are arranged in the x-th qubit, and the control bits start from the (x - 1)-th qubit and decrease sequentially from left to right to the 1st qubit and then increase to the (x - 2)-th qubit until 2 x-2 CNOT gates are arranged.
5. The method according to claim 1, wherein The phase shift angle of the controlled quantum gate is related to the number of qubits n and the phase shift angle θ in the multi-controlled quantum phase shift gate C^{n - 1}PS(θ).
6. The method according to claim 1, characterized in that The phase shift angle of the controlled quantum gate is θ / 2 n-2 .
7. A decomposition device for a multi-controlled quantum phase shift gate, characterized in that, It includes: A decomposition module for decomposing the multi-controlled quantum phase shift gate C^{n - 1}PS(θ) into n - 1 blocks of quantum circuits, where the n - 1 blocks of quantum circuits are connected end to end from left to right, n is the total number of qubits on which the multi-controlled quantum phase shift gate acts, n ≥ 3, and θ is the phase shift angle; The first configuration module is used to configure 2 x-1 controlled quantum gates in the x-th block of quantum circuits. The control bits of the controlled quantum gates are arranged on the x-th qubit, and the target bits are arranged on the n-th qubit. Among them, the controlled quantum phase shift gates and the conjugate transposes of the controlled quantum phase shift gates in the controlled quantum gates are arranged alternately, and the value range of x is from 1 to n-1; The second configuration module is used to configure 2 x-1 CNOT gates in the x-th quantum circuit block. Among them, 0 CNOT gates are configured in the first quantum circuit block, and the CNOT gates are arranged alternately with the controlled quantum gates; Among them, the first 2 x-2 CNOT gates in the x-th quantum circuit have the same arrangement as the last 2 x-2 CNOT gates. The target bits of the first 2 x-2 CNOT gates in the x-th quantum circuit are arranged at the x-th qubit, and the qubits where the control bits are located are arranged in the order from the high-order bit to the low-order bit and then to the high-order bit from left to right.
8. A computing device, characterized in that, It includes: A processor; A memory storing a computer program, which, when executed by the processor, implements the decomposition method for the multi-controlled quantum phase shift gate according to any one of claims 1 - 6.
9. A computer-readable storage medium, characterized in that, Computer instructions are stored in the computer-readable storage medium, which, when executed by the processor, implement the decomposition method for the multi-controlled quantum phase shift gate according to any one of claims 1 - 6.
Citation Information
Patent Citations
Quantum circuit optimization method based on gate decomposition and gate movement
CN116484956A
Quantum circuit generation method and device, storage medium and electronic device
CN117521821A