Partitioning method for multi-qubit quantum Fourier transform circuits
By segmenting quantum Fourier transform lines and quantum-classical hybrid computing methods, the problem that small-scale quantum computers cannot run multi-bit quantum Fourier transform lines is solved, and the effect of running large-scale quantum Fourier transform lines on small-scale quantum computers is achieved.
Patent Information
- Application Number
- CN202210112495.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-01-29
AI Technical Summary
Small-scale quantum computers are unable to run multi-bit quantum Fourier transform lines due to insufficient number of qubits.
By performing line adjustments on quantum Fourier transform lines, it is divided into small-scale sub-quantum lines, and the original multi-bit quantum lines are restored through quantum-classical hybrid calculations.
The number of qubits required for multi-qubit quantum Fourier transform lines is reduced, allowing it to run large-scale quantum Fourier transform lines on small-scale quantum computers.
Smart Images

Figure CN114529003B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of quantum information technology, and in particular relates to a method for segmenting a multi-qubit quantum Fourier transform circuit, which can be used for phase estimation of multi-qubits in quantum communication and quantum computing. Background Art
[0002] As a key part of quantum factorization and various quantum algorithms, quantum Fourier transform is not only the key to the general process of phase estimation, but also the key to many quantum algorithms. Limited quantum bit memory is an important limiting factor affecting the development of large-scale quantum circuits in the near future. Large-scale quantum algorithms under existing conditions are difficult to implement in a single quantum computer. Under the current circumstances, the circuit segmentation method can solve this difficulty: that is, the large-scale quantum circuit is decomposed into multiple small-scale sub-quantum circuits, and the operation results of the sub-circuits are restored to the operation results of the original large-scale circuit after classical post-processing. Quantum Fourier transform is a key module for most quantum algorithms that require phase estimation. By adjusting quantum gates, segmenting circuits, and performing classical post-processing operations, the demand for quantum bits in this key module can be effectively reduced, so that small-scale quantum computers can run large-scale quantum Fourier transform circuits.
[0003] In order to enable large-scale quantum circuits to run on small-scale quantum computers, researchers have proposed many solutions: In 2020, Tianyi Peng first proposed to construct quantum circuits as corresponding tensor networks, and decompose quantum circuits through the decomposability of tensor networks. In 2021, Thomas Ayral proposed a study on the impact of different noise sources on quantum circuits after they are decomposed. However, the quantum circuit decomposition method proposed in the above study is not targeted at any specific quantum circuit, but a quantum circuit decomposition framework and noise research. Because the quantum Fourier transform circuit has not been optimized and preprocessed, it is difficult to directly apply it to multi-bit quantum Fourier transform circuits. This makes the multi-bit quantum Fourier transform circuit face more quantum computing and classical computing overhead after segmentation.
[0004] The present invention intends to decompose a large-scale quantum Fourier transform circuit into a small-scale quantum Fourier transform circuit and a number of sub-quantum circuits, optimize the sub-circuit group and perform parallel quantum calculations, and then perform classical post-processing on the results, combining quantum computers with classical computers to achieve the purpose of reducing the width and depth of quantum circuits. Summary of the invention
[0005] The purpose of the present invention is to propose a method for dividing a multi-bit quantum Fourier transform circuit into parallel sub-circuits and restoring the original multi-bit quantum circuit through quantum-classical hybrid computing. The purpose is to reduce the number of quantum bits required for a multi-qubit quantum Fourier transform circuit and enable it to run a large-scale quantum Fourier transform circuit on a small-scale quantum computer.
[0006] The present invention proposes a multi-bit quantum Fourier transform circuit, which aims to solve the problem that a small-scale quantum computer cannot run a multi-bit quantum Fourier transform circuit due to an insufficient number of quantum bits. The present invention adjusts the quantum gates of the quantum Fourier transform circuit and divides the quantum Fourier transform circuit into several small-scale sub-circuits so that it can be run on a small-scale quantum computer, and restores the running results of the sub-circuits to the original circuit running results before the division through classical calculation methods, so as to realize the running of a multi-bit quantum Fourier transform circuit in a small-scale quantum computer.
[0007] To achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0008] (1) Initialize the multi-qubit quantum Fourier transform circuit and small-scale quantum computer:
[0009] The N-bit quantum Fourier transform circuit consists of N H gates and (N-1)×N / 2 controlled phase gates CP;
[0010] Initialize the N-bit quantum Fourier transform circuit C N The quantum bit is: q = {q 1 ,q 2 ,...q a ,...,q N}, the quantum gate is: g = {g 1 ,g 2 ,...,g b ,...,g M}, the measurement module is: t={t 1 ,t 2 ,...,t a ,...t N}, where q a Represented as the measurement module of the a-th quantum bit, g b Represented as the bth quantum gate, in the N-bit quantum Fourier transform circuit, t a Denoted as quantum bit q a The measurement gates are M, M = (1 + N) N / 2; in the N-bit quantum Fourier transform circuit, the number of measurement gates and the number of quantum bits are both N, then C N Considered as an N-bit quantum Fourier transform module QFTN AND measurement gate t={t 1 ,t 2 ,...,t a ,...t N} combination;
[0011] Set the maximum number of quantum bits n that a small-scale quantum computer has, and the small-scale quantum computer must have at least 2 quantum bits;
[0012] (2) For N-bit quantum Fourier transform circuit C N Make adjustments:
[0013] 2a) Let the initial cycle number i = 0;
[0014] 2b) In the Ni-bit quantum Fourier transform module QFT N-i , which will affect the quantum bit q N-i The quantum gate is placed in the Ni-bit quantum Fourier transform module QFT N-i The back end of the QFT keeps the relative position of the moved quantum gate unchanged. N-i The module can be divided into (N-1-i) quantum Fourier transform modules QFT N-1-i With quantum circuit module CP N-1-i Combination, among which CP N-1-i There are (N-1-i) CP gates and a N-i The bit is composed of H gates;
[0015] 2c) Determine whether i satisfies i≥Nn-1. In the best case, i=Nn-1:
[0016] If it satisfies, then the final original N-bit quantum Fourier transform circuit C N Adjusted to QFT n Modules and {CP n ,CP n+1 ,...,CP N-1} module and measurement module t={t 1 ,t 2 ,...,t a ,...t N} composed of a new quantum circuit F N , and execute (3),
[0017] If not satisfied, set i=i+1 and return to 2b);
[0018] (3) For the new quantum circuit F N To split:
[0019] 3a) Perform two line splits in each cycle, and set the initial cycle number i=0;
[0020] 3b) According to the current cycle number, the new quantum circuit F N-i To split:
[0021] When i = 0, the adjusted N-bit new quantum circuit F N Perform the first line division and set F N Divided into N-1 bit sub-quantum circuit F N-1 With a CP N-1 Module and measurement gate t = {t 1 ,t 2 ,...,t a ,...t N} composed of sub-quantum circuit S N-1 ;
[0022] When i≠0, for the Ni-bit sub-quantum circuit F N-i Perform the first line split in this round, and split the sub-quantum line F N-i Split into (N-1-i)-bit sub-circuits F N-1-i and by CP N-1-i Sub-circuit S formed by the module N-1-i ;
[0023] 3c) Sub-line S N-1-i Perform the second line segmentation of this round, and select the cutting point and the number of cuts x in the i-th cycle according to the maximum number of quantum bits n of the small-scale quantum computer. i , and satisfy n≥(Ni) / (x i +1), which is split into S N-1-i Sub-line group in, Sub-line S N-1-i According to the quantum bit number, the e-th subcircuit from top to bottom;
[0024] 3d) Determine whether i satisfies i≥Nn-1. In the best case, i=Nn-1:
[0025] If satisfied, then all sub-circuits formed in the end are 1 n-bit quantum Fourier transform module QFT n The formed sub-circuit F n The sub-line group set is S = {S N-1 ,S N-2 ,...,S f ,...S n}, where S f It means that after the first division of the Nfth round, there are f CP gates and a quantum bit qf+1 The sub-circuit of the H gate combination, and the sub-circuit S f After the second split in the Nfth round, the sub-circuit group is formed. For S f The subcircuits are executed from top to bottom according to the quantum bit sequence number, and the e-th subcircuit executes (4).
[0026] If not satisfied, set i=i+1 and return to 3b);
[0027] (4) Sub-line processing, operation and measurement:
[0028] 4a) Define the split point to form a pair of corresponding output and input ends after splitting; in each subcircuit, perform three different projection measurements of XYZ on each output end, and prepare four quantum states |0>, |1>, |+>, |i> on each input end, so that each subcircuit can form multiple actual quantum circuits that can be run on a quantum computer; according to the number of input and output ends of each subcircuit, calculate the actual number of quantum circuits T required for each subcircuit cs cs ;
[0029] 4b) According to the n-bit quantum Fourier transform subcircuit F n With only the output terminal, we get F n The actual number of quantum circuits required right After measuring the output end of an actual quantum circuit, it runs on a quantum computer and records its measurement results;
[0030] 4c) For all sub-line groups Sub-circuits in of The output and input of each actual quantum circuit are processed, that is, three different projection measurements of XYZ are performed on each output, and the four preparations of the input are fully arranged. These actual quantum circuits are then run in a quantum computer and the final results are recorded.
[0031] (5) Perform classical post-processing operations on the measurement results of all actual quantum circuits:
[0032] 5a) Let the initial cycle number i=0;
[0033] 5b) According to the current cycle number, S N-1-i The measurement results of the sub-line group are subjected to classical post-processing operations:
[0034] 5b1) For i = 0, let the probability density matrix of the split point be A. From the decomposition formula of A, the integration formula of the sub-circuit can be derived. Through the integration formula of the sub-circuit, SN-1 Each sub-line in the sub-line group The measurement results are integrated into S through classical calculation. N-1 The measurement results of the sub-circuit are named S N-1 The classical calculation results of
[0035] 5b2) For i≠0, let the probability density matrix of the split point be A. From the decomposition formula of A, the integration formula of the sub-circuit can be derived. Through the integration formula of the sub-circuit, S N-1-i Each sub-line in the sub-line group The measurement results are integrated into CS through classical calculation. N-1-i The measurement results of the sub-line group are then compared with the S obtained in the previous cycle. N-i The classical calculation results of S are calculated again by classical calculation. N-1-i The classical calculation results of
[0036] 5c) Determine whether i≥Nn-1 is satisfied. In the best case, i=Nn-1. If so, execute 5d); otherwise, set i=i+1 and return to 5b);
[0037] 5d) When the condition i≥Nn-1 is satisfied and the loop is exited, the optimal situation is i=Nn-1, and S N-1-i Indicated as S n , after getting S n After the classical calculation results of F n The measurement results and S n The classical calculation result of the N-bit quantum Fourier transform C can be restored by performing classical calculation again. N The result of the line.
[0038] Compared with the prior art, the present invention has the following advantages:
[0039] 1. The present invention adjusts the quantum Fourier transform circuit to divide the large-scale quantum Fourier transform circuit into a combination of a small-scale quantum Fourier transform module and a quantum CP gate module, and places the quantum gate that affects the quantum bits exceeding the width of the quantum computer at the back end of the circuit without affecting the operation results of the original circuit, so as to facilitate multiple divisions of the quantum circuit.
[0040] 2. Since the present invention divides the original large-scale quantum Fourier transform circuit into several sub-quantum circuits, and all the sub-circuits can be run in a small-scale quantum computer, it not only reduces the original circuit's demand for the number of quantum bits of the quantum computer, but also enables the large-scale quantum Fourier transform circuit that requires a large number of quantum bits to run on a small-scale quantum computer when quantum bit resources are insufficient.
[0041] 3. The present invention selects the split point and processes the sub-circuit, and optimizes the sub-circuit with only the output end, thereby greatly reducing the number of actual operating quantum circuits required.
[0042] 4. The present invention integrates the measurement results of the sub-circuit into the operation results of the original quantum Fourier transform circuit by integrating classical calculations, and realizes the quantum circuit that requires a large-scale quantum computer to operate through hybrid calculations of small-scale quantum computers and classical computers. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart for realizing the present invention;
[0044] Figure 2 This is a circuit diagram of the original quantum circuit adjustment process of Example 1 of the present invention.
[0045] Figure 3 It is a sub-flow chart of the segmentation of the quantum circuit in the present invention;
[0046] Figure 4 This is a sub-quantum circuit diagram after all processing in Example 1 of the present invention. Specific implementation plan
[0047] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings.
[0048] Reference Figure 1 , the implementation steps of this example are as follows:
[0049] Step 1: Initialize the multi-qubit quantum Fourier transform circuit and the small-scale quantum computer.
[0050] Multi-bit quantum Fourier transform circuits are key parts of quantum factorization and various quantum algorithms. They are not only key to the general process of phase estimation, but also key to many quantum algorithms. A small-scale quantum computer refers to a quantum computer that has a smaller number of quantum registers than a large-scale quantum circuit and cannot directly run a large-scale quantum circuit on it. The purpose of the present invention is to split a multi-qubit quantum Fourier transform circuit that cannot be directly run on a small-scale quantum computer, so that it is split into several sub-circuits that can be run in a small-scale quantum computer, and the operation results of the sub-circuits are restored to the original circuit operation results before the splitting by classical calculation methods, so as to realize the operation of a multi-bit quantum Fourier transform circuit in a small-scale quantum computer.
[0051] First, determine the bit number N of the N-bit quantum Fourier transform circuit and the number of quantum bits n of the small-scale quantum computer; the value of N needs to satisfy N≥3, and the value of n needs to satisfy 2≤n<N;
[0052] The N-bit quantum Fourier transform circuit is composed of N H gates and (N-1)×N / 2 controlled phase gates (CP gates); Initialize the N-bit quantum Fourier transform circuit C N The quantum bit is: q = {q 1 ,q 2 ,...q a ,...,q N}, the quantum gate is: g = {g 1 ,g 2 ,...,g b ,...,g M}, the measurement module is: t={t 1 ,t 2 ,...,t a ,...t N}, where q a Represented as the measurement module of the a-th quantum bit, g b Represented as the bth quantum gate, in the N-bit quantum Fourier transform circuit, t a Denoted as quantum bit q a The measurement gates are M, M = (1 + N) N / 2; in the N-bit quantum Fourier transform circuit, the number of measurement gates and the number of quantum bits are both N, then C N Considered as an N-bit quantum Fourier transform module QFT N AND measurement gate t={t 1 ,t 2 ,...,t a ,...t N} combination;
[0053] In this embodiment, N=6 and n=4 are taken as an example.
[0054] Step 2: For the N-bit quantum Fourier transform circuit C N Make adjustments.
[0055] The specific implementation of this step is as follows:
[0056] 2.1) Let the initial cycle number i = 0;
[0057] 2.2) In the Ni-bit quantum Fourier transform module QFT N-i , which will affect the quantum bit q N-i The quantum gate is placed in the Ni-bit quantum Fourier transform module QFT N-i The back end of the QFT N-i The module is divided into (N-1-i) quantum Fourier transform modules QFT N-1-i With quantum circuit module CP N-1-i, where CP N-1-i There are (N-1-i) CP gates and a N-i The bit is composed of H gates;
[0058] 2.3) Determine whether i satisfies i≥Nn-1. In the best case, i=Nn-1:
[0059] If it satisfies, then the final original N-bit quantum Fourier transform circuit C N Adjusted to QFT n Modules and {CP n ,CP n+1 ,...,CP N-1} module and measurement module t={t 1 ,t 2 ,...,t a ,...t N} composed of a new quantum circuit F N , execute step 3,
[0060] If not satisfied, set i=i+1 and return to 2.2).
[0061] In this embodiment, since N=6, n=4, the termination condition of the loop is i≥1, the original 6-bit quantum Fourier transform circuit C 6 Adjusted to QFT 4 Modules and {CP 4 ,CP 5} module and measurement module t={t 1 ,t 2 ,...t 6} composed of a new quantum circuit F 6 ; Adjustment process reference Figure 2 ,in, Figure 2 a is the original 6-bit quantum Fourier transform circuit; Figure 2 b is the line after the cycle i=0 is completed; Figure 2 c is the line after the cycle i=1 is completed, and is also the line after the final adjustment is completed.
[0062] Step 3: For the new quantum circuit F N to split.
[0063] Reference Figure 3 , the specific implementation of this step is as follows:
[0064] 3.1) Perform two line splits in each cycle, and set the initial cycle i=0;
[0065] 3.2) When i = 0, the adjusted N-bit quantum Fourier transform circuit F N It is composed of n-bit quantum Fourier transform module QFTn With {CP n ,CP n+1 ,...,CP N-1}, when splitting, the cutting point is selected at {q 1 ,q 2 ,...,q N-1}The paths of these qubits are located at CP N-1 The position before the module entrance is divided into two sub-circuits, one of which is an n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-2 The N-1-bit sub-quantum circuit F composed of} modules N-1 , and the other is by CP N-1 Module and measurement gate t = {t 1 ,t 2 ,...,t a ,...t N} composed of sub-quantum circuit S N-1 ;
[0066] When i≠0, the sub-quantum circuit F of Ni bits N-i The n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-1-i} module, the cutting point is selected at {q 1 ,q 2 ,...,q N-2-i These qubit routes are located at CP N-1-i The position before the module entrance is divided into two sub-circuits, one of which is the n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-2-i} module composed of (N-1-i)-bit sub-quantum circuit F N-1 , and the other is by CP N-1-i Sub-circuit S formed by the module N-1-i .
[0067] 3.3) For sub-line S N-1-i Perform the second line segmentation of this round, and select the cutting point and the number of cuts x in the i-th cycle according to the maximum number of quantum bits n of the small-scale quantum computer. i , and satisfy n≥(Ni) / (x i +1), which is split into S N-1-i Sub-line group in, Sub-line S N-1-i According to the quantum bit number, the e-th sub-circuit from top to bottom;
[0068] 3.4) Determine whether i satisfies i≥Nn-1. In the best case, i=Nn-1:
[0069] If satisfied, then all sub-circuits formed in the end are 1 n-bit quantum Fourier transform module QFT n The formed sub-circuit F n The sub-line group set is S = {S N-1 ,S N-2 ,...,S f ,...S n}, where S f It means that after the first division of the Nfth round, there are f CP gates and a quantum bit q f+1 The sub-circuit of the H gate combination, and the sub-circuit S f After the second split in the Nfth round, the sub-circuit group is formed. For S f The subcircuits follow the quantum bit sequence from top to bottom, and execute step 4.
[0070] If not satisfied, set i=i+1 and return to 3.2);
[0071] In this embodiment, since N=6, n=4, the termination condition is i≥1, and the circuit F 6 Divided into: 1 4-bit quantum Fourier transform module QFT 4 The formed sub-circuit F 4 The sub-line group set is S = {S 5 ,S 4};in YesS 5 Two sub-lines in the sub-line group, YesS 4 Two sub-circuits in a sub-circuit group.
[0072] Step 4: Process, operate and measure all sub-circuits.
[0073] 4.1) After the split point is split, two endpoints are formed. The endpoint at the end of the preceding sub-circuit is defined as the output end, and the endpoint at the front end of the subsequent sub-circuit is defined as the input end;
[0074] 4.2) In the subcircuit, three different projection measurements of XYZ are performed on each output end, and four quantum states |0>, |1>, |+>, |i> are prepared for each input end, so that each subcircuit forms multiple actual quantum circuits that can be run on a quantum computer; according to the number of input and output ends of each subcircuit, the actual number of quantum circuits T required for each subcircuit cs is calculated cs =4 d ×3 u , where u is the number of output terminals contained in the subcircuit, and d is the number of input terminals. No matter how many times the subcircuit is split, the sum of the number of output terminals of all subcircuits is always equal to the sum of the number of input terminals.
[0075] On this basis, this example optimizes the subcircuit with d=0. Since the output ends are at the end of the subcircuit, and the measurement results of each quantum bit at the end are independent of each other and are not affected, in the subcircuit with d=0, only three actual quantum circuits are needed to run on the quantum computer and record the measurement results; the three actual quantum circuits are: X-projection measurement of all upstream points of the subcircuit, Y-projection measurement of all upstream points of the subcircuit, and Z-projection measurement of all upstream points of the subcircuit. After optimization, the actual quantum circuits T required for each subcircuit are cs for:
[0076]
[0077] 4.2) According to the n-bit quantum Fourier transform subcircuit F n With only the output terminal, we get F n The actual number of quantum circuits required right After measuring the output end of an actual quantum circuit, it runs on a quantum computer and records its measurement results;
[0078] 4.3) For all sub-line groups Sub-circuits in of The output and input of each actual quantum circuit are processed, that is, three different projection measurements of XYZ are performed on each output, and the four preparations of the input are fully arranged. These actual quantum circuits are then run in a quantum computer and the final results are recorded.
[0079] In this embodiment, the quantum circuit diagram after all sub-circuits are processed is as follows: Figure 4 As shown; among them, Figure 4 a is sub-line F 4 , Figure 4 b is the sub-line Figure 4 c is the sub-line Figure 4 d is a sub-circuit Figure 4 e is a sub-circuit
[0080] Step 5, perform classical post-processing operations on the measurement results of all actual quantum circuits.
[0081] 5.1) Let the initial loop iteration number i = 0;
[0082] 5.2) Perform classical post-processing operations on the measurement results of the S N-1-i sub-circuit group according to the current loop iteration number:
[0083] 5.2.1) For i = 0, through the integration formula of the sub-circuit, the S N-1 measurement results of each sub-circuit in the sub-circuit group are classically calculated and integrated and restored to the measurement result of the S N-1 sub-circuit as follows: Steps are as follows:
[0084] 5.2.1a) Let the probability density matrix of the splitting point be A:
[0085]
[0086] Further decompose the matrix A into a combination of Pauli matrices and their eigenbasis terms to obtain the following identity:
[0087]
[0088] where Tr(AZ) is the trace of the probability density matrix obtained from the Z measurement result at the corresponding output end of the sub-circuit; Tr(AX) and Tr(AY) are the traces of the probability density matrices obtained from the X and Y measurement results at the corresponding output end of the sub-circuit, respectively; |0><0|, |1><1|, |+><+|, |i><i| are the probability density matrices for preparing the |0>, |1>, |+>, |i> states at the corresponding input ends, respectively, and Tr(AI) is the trace of the probability density matrix obtained from the I measurement result at the corresponding output end of the sub-circuit. Since the I measurement and the Z measurement are physically consistent in the quantum circuit and Tr(AI) = 1 always;
[0089] 5.2.1b) According to all the sub-circuits in the S N-1 sub-circuit group, there are x i corresponding output ends and input ends and N - 1 isolated input ends, and there are 4 (N-1) combinations of quantum state preparations for the N - 1 isolated input ends; and let the set of all quantum state preparation combinations of the N - 1 isolated input ends be having:
[0090]
[0091] 5.2.1c) Let the initial round of the outer loop k = 1;
[0092] 5.2.1d) Maintain S N-1 The quantum state preparation combination of the N-1 isolated input terminals of the sub-circuit group in this outer cycle is: Let the initial round of the inner loop j = 1;
[0093] 5.2.1e) Use the decomposition formula of A to derive the integration formula of the sub-route, combined with the original route C N Carrying measuring door, and The sub-circuit is integrated with classical calculation, that is, the probability density matrix of the quantum bit at the split point is A, and the following integrated classical calculation formula is obtained:
[0094]
[0095] in: To convert the subcircuit into The result of the integrated calculation; 1,k For the pair of lines The corresponding output terminal is A k The result of the projection measurement in the trace, p 2,k For the sub-line The corresponding input terminal is A k After the quantum state is prepared in the subcircuit The running results in A k is the kth item decomposed by the probability density matrix A, and the value range of k is k={1,2,3,4}, p 1,k With p 2,k They are respectively expressed as follows:
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104] In the formula, relationship; For sub-line The quantum state to be measured by the original measurement gate, For sub-line The original measurement gate to measure the quantum state Sub-lines The trace of the probability density matrix obtained from the I, Z, X, and Y measurements at the output; For sub-line The original measurement gate measured probability; Sub-lines Under the conditions of preparing |0>, |1>, |+>, |i> states at the input end, the original measurement gate measures the quantum state probability; To convert the subcircuit into Integrate the results of the calculations;
[0105] 5.2.1f) Order Determine whether j satisfies j=x i :
[0106] If satisfied, then there is at this time, Sub-line groups have been integrated into S N-1 Sub-circuit preparation at isolated input Time measurement The probability of make Execute 5.2.1g);
[0107] If not satisfied, set j=j+1 and return to 5.2.1e);
[0108] 5.2.1g) Determine whether k satisfies k = 4 (N-1) :
[0109] If satisfied, then, The sub-line group has been fully integrated into S N-1 Sub-line; execute 5.2.2);
[0110] If not satisfied, set k=k+1 and return to 5.2.1d);
[0111] In this embodiment, the sub-circuit The measurement results are restored to the sub-circuit S using classical calculations. 5 Results
[0112] 5.2.2) For i≠0, set SN-1-i Each sub-line in the sub-line group The measurement results are integrated into S through classical calculation. N-1-i Overall operation results of the sub-line group
[0113] 5.2.2a) Take the direct product of the quantum states of the single qubits at the N-1-i input terminals and get 4 (N-1-i) The initial quantum state of the input terminal; let the set of all quantum states be The internal elements of the collection are represented as follows:
[0114]
[0115] 5.2.2b) Let Ni output ports pass through the full array of X, Y, Z measurements, and get 3 (N-1-i) measurement combinations, let the set of all combinations be The internal elements of the collection are represented as follows:
[0116]
[0117] 5.2.2c) Let the initial loop number of the first loop be l = 1;
[0118] 5.2.2d) Maintain S N-1-i The measurement combination of Ni isolated output terminals is Let the initial round of the second-layer loop k = 1;
[0119] 5.2.2e) Maintain S N-1-i The quantum state preparation combination of N-1-i isolated input terminals is Let the initial round of the third layer loop j = 1;
[0120] 5.2.2f) According to the decomposition formula of the probability density matrix A, we can get the sub-circuit and The following formula is used for integrated classical calculation:
[0121]
[0122] in: To convert the subcircuit into The result of the integrated calculation; 1,k For the pair of lines The corresponding output terminal is A k The result of the projection measurement in the trace, p 2,k For the sub-line The corresponding input terminal is A k After the quantum state is prepared in the subcircuit The running results in Ak is the kth item decomposed by the probability density matrix A, and the value range of k is k={1,2,3,4}, p 1,k With p 2,k They are respectively expressed as follows:
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131] in, For sub-line The isolated output terminal is The measurement combination is the quantum state to be measured, For sub-line The isolated output terminal is Measuring the quantum state of the combination to be measured Sub-lines The trace of the probability density matrix corresponding to the measurement results of the output terminals I, Z, X, and Y; For sub-line The isolated output terminal is The measurement combination was measured The probability of Sub-lines The quantum state is measured under the conditions of preparing |0>, |1>, |+>, |i> states at the corresponding input ends The probability of
[0132] 5.2.2g) Order Determine whether j satisfies j=x i :
[0133] If satisfied, then Sub-lines have been integrated into S N-1-i Sub-circuit preparation at isolated input And measure the selection at the isolated output Time measurement The probability of make Execute 5.2.2h);
[0134] Otherwise, set j=j+1 and return to 5.2.2f);
[0135] 5.2.2h) Determine whether k satisfies k = 4 (N-i-1) :
[0136] If satisfied, proceed to 5.2.2i);
[0137] Otherwise, set k=k+1 and return to 5.2.2e);
[0138] 5.2.2i) Determine whether l satisfies l = 3 (N-i) :
[0139] If satisfied, then Sub-line groups have been integrated into CS N-1-i Sub-line measurement results Execute 5.2.3);
[0140] Otherwise, set l = l + 1 and return to 5.2.2d);
[0141] 5.2.3) CS N-1-i Sub-line measurement results Compared with the S obtained in the previous round N-i The classical calculation results of By integrating classical calculations again, we obtain The classical calculation results are implemented as follows:
[0142] 5.2.3a) will be integrated into CS N-1-i The measurement results of the sub-circuit and the obtained S N-i The classical calculation results are integrated again:
[0143] First, according to the probability density matrix of multiple parallel split points Expand the formula to Expands to:
[0144]
[0145] Among them A a Can be decomposed into A a1 ,A a2 ,A a3 ,A a4 :
[0146]
[0147] A a1 =[Tr(A aI)+Tr(A a Z)]|0 a ><0 a |
[0148] A a2 =[Tr(A a I)-Tr(A a Z)]|1 a ><1 a |
[0149] A a3 =Tr(A a X)[2|+ a ><+ a |-|0 a ><0 a |-|1 a ><1 a |]
[0150] A a4 =Tr(A a Y)[2|i a > a |-|0 a ><0 a |-|1 a ><1 a |]
[0151] Secondly, A a Substitute the decomposition formula into the probability density matrix Decomposing the formula, we get:
[0152] in:
[0153]
[0154]
[0155]
[0156]
[0157] 5.2.3b) B b It is considered as the sum of the Tr factors of the corresponding output terminals and multiplied by the combined probability density matrix of the corresponding input terminals to obtain the calculated S N-1-i The classical calculation results of
[0158]
[0159] where p 1,k For B b The Tr factors measured at multiple corresponding output terminals are added together, p 2,k For B b After the quantum state of the input end is prepared, it is obtained through classical calculation Result;
[0160] 5.3) Determine whether i≥Nn-1 is satisfied. In the best case, i=Nn-1. If so, execute 5.4); otherwise, set i=i+1 and return to 5.2);
[0161] In this embodiment, S={S 5 ,S 4 All sub-circuits in} have been integrated, and the result of the integrated S circuit is p(|Q S4 >);
[0162] 5.4) According to the relationship that i=Nn-1 exists when the loop is exited when the condition i≥Nn-1 is satisfied, S N-1-i Indicated as S n , after getting S n After the classical calculation results of F n The measurement results and S n The classical calculation result of the N-bit quantum Fourier transform C can be restored by performing classical calculation again. N The result of the circuit is reduced to N-bit quantum Fourier transform C N The result of the line is achieved as follows:
[0163]
[0164] where p 1,k F n The different measurement results at the output refer to B k The trace calculation of the measurement results of multiple corresponding output terminals of the decomposition formula is obtained, p 2,k For B k After the quantum state corresponding to the probability density matrix at the input end is prepared, the measurement is obtained The results show that This is the result of the final N-bit quantum Fourier transform circuit.
[0165] The final result of this example This is the operating result of the original 6-bit quantum Fourier transform circuit.
[0166] The above description is only a specific example of the present invention and does not constitute any limitation to the present invention. It is obvious that for professionals in this field, after understanding the content and principles of the present invention, it is possible to make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.
Claims
1. A method for segmenting a multi-qubit quantum Fourier transform circuit, characterized in that: These include: (1) Initialize the multi-qubit quantum Fourier transform circuit and small-scale quantum computer: The N-bit quantum Fourier transform circuit consists of N H gates and (N-1)×N / 2 controlled phase gates CP; Initialize the N-bit quantum Fourier transform circuit C N The quantum bits are: q={q1,q2,...q a ,...,q N }, the quantum gate is: g = {g1,g2,...,g b ,...,g M }, the measurement module is: t={t1,t2,...,t a ,...t N }, where q a Represented as the measurement module of the a-th quantum bit, g b Represented as the bth quantum gate, in the N-bit quantum Fourier transform circuit, t a Denoted as quantum bit q a The measurement gates are M, M = (1 + N) N / 2; in the N-bit quantum Fourier transform circuit, the number of measurement gates and the number of quantum bits are both N, then C N Considered as an N-bit quantum Fourier transform module QFT N AND measurement gate t={t1,t2,...,t a ,...t N } combination; Set the maximum number of quantum bits n that a small-scale quantum computer has, and the small-scale quantum computer must have at least 2 quantum bits; (2) For N-bit quantum Fourier transform circuit C N Make adjustments: 2a) Let the initial cycle number i = 0; 2b) In the Ni-bit quantum Fourier transform module QFT N-i , which will affect the quantum bit q N-i The quantum gate is placed in the Ni-bit quantum Fourier transform module QFT N-i The back end of the QFT keeps the relative position of the moved quantum gate unchanged. N-i The module can be divided into (N-1-i) quantum Fourier transform modules QFT N-1-i With quantum circuit module CP N-1-i Combination, among which CP N-1-i There are (N-1-i) CP gates and a N-i The bit is composed of H gates; 2c) Determine whether i satisfies i≥Nn-1. In the best case, i=Nn-1: If it satisfies, then the final original N-bit quantum Fourier transform circuit C N Adjusted to QFT n Modules and {CP n ,CP n+1 ,...,CP N-1 } module and measurement module t={t1,t2,...,t a ,...t N } composed of a new quantum circuit F N , and execute (3), If not satisfied, set i=i+1 and return to 2b); (3) For the new quantum circuit F N To split: 3a) Perform two line splits in each cycle, and set the initial cycle number i=0; 3b) According to the current cycle number, the new quantum circuit F N-i To split: When i = 0, the adjusted N-bit new quantum circuit F N Perform the first line division and set F N Divided into N-1 bit sub-quantum circuit F N-1 With a CP N-1 Module and measurement gate t={t1,t2,...,t a ,...t N } composed of sub-quantum circuit S N-1 ; When i≠0, for the Ni-bit sub-quantum circuit F N-i Perform the first line split in this round, and split the sub-quantum line F N-i Split into (N-1-i)-bit sub-circuits F N-1-i and by CP N-1-i Sub-circuit S formed by the module N-1-i ; 3c) Sub-line S N-1-i Perform the second line segmentation of this round, and select the cutting point and the number of cuts x in the i-th cycle according to the maximum number of quantum bits n of the small-scale quantum computer. i , and satisfy n≥(Ni) / (x i +1), which is split into S N-1-i Sub-line group in, Sub-line S N-1-i According to the quantum bit number, the e-th sub-circuit from top to bottom; 3d) Determine whether i satisfies i≥Nn-1. In the best case, i=Nn-1: If satisfied, then all sub-circuits formed in the end are 1 n-bit quantum Fourier transform module QFT n The formed sub-circuit F n The sub-line group set is S = {S N-1 ,S N-2 ,...,S f ,...S n }, where S f It means that after the first division of the Nfth round, there are f CP gates and a quantum bit q f+1 The sub-circuit of the H gate combination, and the sub-circuit S f After the second split in the Nfth round, the sub-circuit group is formed. For S f The subcircuits are executed from top to bottom according to the quantum bit sequence number, and the e-th subcircuit executes (4). If not satisfied, set i=i+1 and return to 3b); (4) Sub-line processing, operation and measurement: 4a) Define the split point to form a pair of corresponding output and input ends after splitting; in each subcircuit, perform three different projection measurements of XYZ on each output end, and prepare four quantum states |0>, |1>, |+>, |i> on each input end, so that each subcircuit can form multiple actual quantum circuits that can be run on a quantum computer; according to the number of input and output ends of each subcircuit, calculate the actual number of quantum circuits T required for each subcircuit cs cs ; 4b) According to the n-bit quantum Fourier transform subcircuit F n With only the output terminal, we get F n The actual number of quantum circuits required right After measuring the output end of an actual quantum circuit, it runs on a quantum computer and records its measurement results; 4c) For all sub-line groups Sub-circuits in of The output and input of each actual quantum circuit are processed, that is, three different projection measurements of XYZ are performed on each output, and the four preparations of the input are fully arranged. These actual quantum circuits are then run in a quantum computer and the final results are recorded. (5) Perform classical post-processing operations on the measurement results of all actual quantum circuits: 5a) Let the initial cycle number i=0; 5b) According to the current cycle number, S N-1-i The measurement results of the sub-line group are subjected to classical post-processing operations: 5b1) For i = 0, let the probability density matrix of the split point be A. From the decomposition formula of A, the integration formula of the sub-circuit can be derived. Through the integration formula of the sub-circuit, S N-1 Each sub-line in the sub-line group The measurement results are integrated into S through classical calculation. N-1 The measurement results of the sub-circuit are named S N-1 The classical calculation results of 5b2) For i≠0, let the probability density matrix of the split point be A. From the decomposition formula of A, the integration formula of the sub-circuit can be derived. Through the integration formula of the sub-circuit, S N-1-i Each sub-line in the sub-line group The measurement results are integrated into CS through classical calculation. N-1-i The measurement results of the sub-line group are then compared with the S obtained in the previous cycle. N-i The classical calculation results of S are calculated again by classical calculation. N-1-i The classical calculation results of 5c) Determine whether i≥Nn-1 is satisfied. In the best case, i=Nn-1. If so, execute 5d); otherwise, set i=i+1 and return to 5b); 5d) When the condition i≥Nn-1 is satisfied and the loop is exited, the optimal situation is i=Nn-1, and S N-1-i Indicated as S n , after getting S n After the classical calculation results of F n The measurement results and S n The classical calculation result of the N-bit quantum Fourier transform C can be restored by performing classical calculation again. N The result of the line.
2. The method according to claim 1, characterized in that The division of the sub-quantum circuit in 3b) is achieved as follows: When i=0, the adjusted N-bit quantum Fourier transform circuit F N It is composed of n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-1 }, and the cutting point is selected at {q1,q2,...,q N-1 }The paths of these qubits are located at CP N-1 The position before the module entrance is divided into two sub-circuits, one of which is an n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-2 } module composed of N-1 bit sub-quantum circuit F N-1 , and the other is by CP N-1 Module and measurement gate t={t1,t2,...,t a ,...t N } composed of sub-quantum circuit S N-1 ; When i≠0, the sub-quantum circuit F of Ni bits N-i The n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-1-i } modules, and the cutting point is selected at {q1,q2,...,q N-2-i These qubit routes are located at CP N-1-i The position before the module entrance is divided into two sub-circuits, one of which is the n-bit quantum Fourier transform module QFT n With {CP n ,CP n+1 ,...,CP N-2-i } module composed of (N-1-i)-bit sub-quantum circuit F N-1 , and the other is by CP N-1-i Sub-circuit S formed by the module N-1-i .
3. The method according to claim 1, characterized in that In 4a), the actual number of quantum circuits T required for each subcircuit cs is calculated based on the number of output and input terminals of each subcircuit. cs , implemented as follows: Among them, u is the number of output terminals contained in the sub-circuit, and d is the number of input terminals.
4. The method according to claim 1, characterized in that: 5b1) For i=0, change S N-1-i Each sub-line in the sub-line group The measurement results are integrated into S through classical calculation. N-1-i The measurement results of the sub-circuit are implemented as follows: 5b11) Determine the probability of a pair of corresponding outputs and inputs in classical computing: The decomposition formula of A is as follows: Further decomposing the matrix A into Pauli matrices and their characteristic basis combinations, we obtain the following identity: A1=[Tr(AI)+Tr(AZ)]|0><0| A2=[Tr(AI)-Tr(AZ)]|1><1| A3=Tr(AX)[2|+><+|-|0><0|-|1><1|] A4=Tr(AY)[2|i><i|-|0> <0|-|1><1|] Among them, Tr(AZ) is the trace of the probability density matrix obtained from the Z measurement result at the corresponding output end of the sub-circuit; Tr(AX) and Tr(AY) are the traces of the probability density matrices obtained from the X and Y measurement results at the corresponding output end of the sub-circuit respectively; |0><0|, |1><1|, |+><+|, |i><i| are the probability density matrices for preparing the |0>, |1>, |+>, |i> states at the corresponding input ends respectively, Tr(AI) is the trace of the probability density matrix obtained from the I measurement result at the corresponding output end of the sub-circuit. Since the I measurement and the Z measurement are physically identical in the quantum circuit and Tr(AI) = 1 always holds; S N-1 There are x in all sub-circuits within the sub-circuit group i For the corresponding output and input ends, and there are N - 1 isolated output ends; there are 4 in total for the N - 1 isolated output ends (N-1) combinations of quantum state preparations; Let N-1 output terminals prepare a quantum state combination have: 5b12) Let the initial round of the outer loop k = 1; 5b13) Keep S N-1 The N-1 input terminal quantum state preparation combination of the sub-circuit group in this cycle is Let the initial round of the inner loop j = 1; 5b14) Use the decomposition formula of A to derive the integration formula of the sub-circuit, combined with the original circuit C N Carrying measuring door, and The sub-circuit is integrated with classical calculation, that is, the probability density matrix of the quantum bit at the split point is A, and the following integrated classical calculation formula is obtained: in: To convert the subcircuit into The result of the integrated calculation; 1,k For the pair of lines The corresponding output terminal is A k The result of the projection measurement in the trace, p 2,k For the sub-line The corresponding input terminal is A k After the quantum state is prepared in the subcircuit The running results in A k is the kth item decomposed by the probability density matrix A, and the value range of k is k={1,2,3,4}, p 1,k With p 2,k They are respectively expressed as follows: In the formula, relationship; For sub-line The quantum state to be measured by the original measurement gate, For sub-line The original measurement gate to measure the quantum state Sub-lines The trace of the probability density matrix obtained from the I, Z, X, and Y measurements at the output; For sub-line The original measurement gate measured probability; Sub-lines Under the conditions of preparing |0>, |1>, |+>, |i> states at the input end, the original measurement gate measures the quantum state probability; To convert the subcircuit into Integrate the results of the calculations; 5b15) Order Determine whether j satisfies j=x i : If satisfied, then there is at this time, Sub-line groups have been integrated into S N-1 Sub-circuit preparation at isolated input Time measurement The probability of make Execute 5b16); If not satisfied, set j=j+1 and return to 5b14); 5b16) Determine whether k satisfies k=4 (N-1) : If satisfied, then, The sub-line group has been fully integrated into S N-1 Sub-line If not satisfied, set k=k+1 and return to 5b13).
5. The method according to claim 1, characterized in that 5b2) For i≠0, then S N-1-i Each sub-line in the sub-line group The measurement results are integrated into CS through classical calculation. N-1-i The measurement results of the sub-line group are then compared with the S obtained in the previous cycle. N-i The classical calculation results of are again classically calculated and implemented as follows: 5b21) Take the direct product of the quantum states of the single qubits at the N-1-i input terminals and get 4 (N-1-i) The initial quantum state of the input terminal; let the set of all quantum states be The internal elements of the collection are represented as follows: Let Ni output terminals pass through the full arrangement of X, Y, Z measurements, and get 3 (N-1-i) measurement combinations, let the set of all combinations be The internal elements of the collection are represented as follows: 5b22) Let the initial loop number of the first loop be l=1; 5b23) Keep S N-1-i The measurement combination of Ni isolated output terminals is Let the initial round of the second-layer loop k = 1; 5b24) Keep S N-1-i The quantum state preparation combination of N-1-i isolated input terminals is Let the initial round of the third layer loop j = 1; 5b25) According to the decomposition formula of probability density matrix A, we can get the pair of sub-circuits and The following formula is used for integrated classical calculation: in: To convert the subcircuit into The result of the integrated calculation; 1,k For the pair of lines The corresponding output terminal is A k The result of the projection measurement in the trace, p 2,k For the sub-line The corresponding input terminal is A k After the quantum state is prepared in the subcircuit The running results in A k is the kth item decomposed by the probability density matrix A, and the value range of k is k={1,2,3,4}, p 1,k With p 2,k They are respectively expressed as follows: in, For sub-line The isolated output terminal is The measurement combination is the quantum state to be measured, For sub-line The isolated output terminal is Measuring the quantum state of the combination to be measured Sub-lines The trace of the probability density matrix corresponding to the measurement results of the output terminals I, Z, X, and Y; For sub-line The isolated output terminal is The measurement combination was measured probability; Sub-lines The quantum state is measured under the conditions of preparing |0>, |1>, |+>, |i> states at the corresponding input ends The probability of 5b26) Order Determine whether j satisfies j=x i : If satisfied, then Sub-lines have been integrated into S N-1-i Sub-circuit preparation at isolated input And measure the selection at the isolated output Time measurement The probability of make Execute 5b27); Otherwise, let j=j+1 and return to 5b25); 5b27) Determine whether k satisfies k=4 (N-i-1) : If satisfied, execute 5b28); Otherwise, let k=k+1 and return to 5b24); 5b28) Determine whether l satisfies l=3 (N-i) : If satisfied, then Sub-line groups have been fully integrated into CS N-1-i For the measurement results of the sub-circuit, execute 5b29); Otherwise, let l=l+1 and return to 5b23); 5b29) will be integrated into CS N-1-i The measurement results of the sub-circuit and the obtained S N-i The classical calculation results are integrated again: First, according to the probability density matrix of multiple parallel split points Expand the formula to Expands to: Among them A a Can be decomposed into A a1 ,A a2 ,A a3 ,A a4 : A a1 =[Tr(A a I)+Tr(A a Z)]|0 a ><0 a | A a2 =[Tr(A a I)-Tr(A a Z)]|1 a ><1 a | A a3 =Tr(A a X)[2|+ a ><+ a |-|0 a ><0 a |-|1 a ><1 a |] TO a4 =Tr(A a Y)[2|i a > a |-|0 a ><0 a |-|1 a ><1 a |] Secondly, A a Substitute the decomposition formula into the probability density matrix Decomposing the formula, we get: in: 5b210) B b It is considered as the sum of the Tr factors of the corresponding output terminals and multiplied by the combined probability density matrix of the corresponding input terminals to obtain the calculated S N-1-i The classical calculation results of where p 1,k For B b The Tr factors measured at multiple corresponding output terminals are added together, p 2,k For B b After the quantum state of the input end is prepared, it is obtained through classical calculation result.
6. The method according to claim 1, characterized in that 5d) For C n The measurement results and S n The classical calculation results of are again classically calculated and restored to the N-bit quantum Fourier transform C N The result of the line is achieved as follows: where p 1,k F n The different measurement results at the output refer to B b The decomposition formula is obtained by performing trace calculations on the multiple corresponding output end measurements, p 2,k For B b After the quantum state corresponding to the probability density matrix at the input end is prepared, the measurement is obtained The results show that This is the result of the final N-bit quantum Fourier transform circuit.