1. Introduction
In recent years, increased work has been done but much remains to be done in the development of existing and novel methods of data processing in new computers named quantum computers. Quantum circuits are complex, since all operations, or gates, should be invertible (unitary), and all calculations should be performed on normalized data, which are called quantum superpositions [1,2]. Another feature is the impossibility of measuring the quantum states during calculation in circuits without destroying the complete quantum superposition. Quantum states change instantly as soon as they are observed. In other words, they are well protected from our interference. So even simple tasks require hundreds of thousands of runs of the same quantum circuit to observe reliable data for computing. All that tells us that we need to develop effective and, most importantly, simple methods of building quantum circuits. Many simple one- and two-qubit gates are well known in quantum computation [3,4,5]. However, how to use them in the most effective way to build universal codes, or circuits, to compute multi-qubit quantum operations is still an open problem to be solved.
Multi-qubit operations, or gates, in quantum computation are described by unitary matrices, real or complex. It means that if we build the circuit for multi-qubit operation , it is not difficult to obtain the circuit for inverse operation . This is a good and desirable property for the transform. However, the requirement for operation to be unitary makes it difficult to implement many important operations. For instance, in engineering, we mention the operation of linear convolution, correlation, linear filtration, optimal or Wiener filtration, and signal and image restoration [6,7].
Studying different methods of matrix decomposition, such as the Gramm–Schmidt process [8], the method of Householder transformations [9,10], cosine-sine decomposition (CSD) [11], and QR-decomposition by Givens rotations [12,13], we choose QR-decomposition. This decomposition, or the factorization for the case of unitary matrices, has been studied and used by many researchers. To build quantum circuits for multi-qubit operations and state preparations, this decomposition has been combined with different permutations [14,15,16,17,18,19,20]. The purpose of such additional permutations, including CNOT operations and Gray code-based permutations, is the requirement to fulfil the computations only on adjacent bit planes (BP), that is, which differ by only one bit [21,22,23]. The presence of permutations and CNOT gates is associated with multiple switching of information flows from one set of qubits to others. Even for a small number of qubits, for example, 4-qubit operations, the number of only CNOT operations is estimated as . Many quantum circuits are populated with different switches. The possibility of removing all such permutations from the circuits was noted in our work devoted to 3-qubit operations [24]. Permutations are not mandatory elements in a universal set of gates, they are not needed at all for multi-qubit operations. We mention several quantum circuits that are used to compute the -qubit quantum Fourier transform (QFT) [25,26]. It is a complicated operation, but implementation of this operation by the Cooley–Tookey algorithm [27,28] and paired-transform based method [29] do not include the CNOT gates in the circuits of the -qubit QFT. In connection with what has been said, we present Table 1 with CNOT counts in the known circuits for -qubit operations (see Table 1 in [30] (p. 1008)). This table includes for comparison, the known QR decomposition, cosine-sine decomposition (CSD), and quantum Shannon decomposition (QSD).
This work is the continuation of the above mentioned publication that describes in detail only the case of 3-qubit operations with real unitary matrices, not complex. Here, we consider the general case of 3- and 4-qubit operations. The QR-decomposition and circuits for computing these operations are described in detail. The QR-decomposition is based on the concept of the discrete-time signal-induced heap transform (DsiHT) [33,34]. Namely, we consider its particular case, when the transform is generated (induced) by one signal, not several. This transform is used in the QR decomposition with a special property. On each stage of the decomposition, we introduce the roadmap of the transform. It shows a path, the “fast path,” for the DsiHT to operate exclusively on adjacent bit-planes, which ensures optimization of the quantum circuit layout. That allows us to entirely eliminate CNOT gates and Gray-code permutations from the circuits.
The DsiHT is generated by a given signal, and there are many ways to compose this transform by using the path of the transform. The path is an especially important characteristic of the transform, and from the very beginning when this transform was presented (Grigoryan [35]), we have repeatedly drawn attention to the choice of this path. It was shown, for example, that the right choice of such a path may significantly reduce the number of zeros of the unitary matrix in the decomposition for a square matrix, in the general case when is not necessarily unitary. That reduces the number of multiplications in the matrix calculation. Thus, the traditional method of processing data in the natural order ) is not the best way (or path) of processing data in QR decomposition of an matrix . In quantum computation, we only consider the case when is a power of 2, . The quantum analogue of the -point DsiHT is the -qubit quantum signal-induced transform (QsiHT) [36].
The key contributions of this work are: New effective roadmaps or “fast paths” for all fifteen DsiHTs in the QR decomposition of a 4-qubit operation, real or complex. No additional permutations with Gray codes or CNOT gates are required in the decomposition. For any 3- or 4-qubit operation (circuit), the universal set of gates consists only of - and -rotations, plus the phase gate. For quantum operations with unitary real matrices, only Givens rotations are required. A universal and transparent circuit for quantum 3- and 4-qubit operations. The quantum circuit with a maximum of 120 controlled rotation gates and depth of 54 for 4-qubit real operation. The circuit for complex 4-qubit operation requires a maximum of -rotation gates, -rotation gates, and no permutations. A simple circuit for generating any 3- and 4-qubit operation with a real or complex unitary matrix by using an encoding table. A general method for constructing circuits for multi-qubit operations with maximum of -rotation gates, -rotation gates and no permutations, for qubits.
The rest of the paper is organized as follows. In Section 2, the concept of the DsiHT is briefly discussed. The roadmaps for the 3-qubit QsiHT is presented. The complex DsiHT is considered in Section 3. Section 4 describes the method of DsiHT-based QR decomposition on the example with an 8 8 matrix, . In Section 5 and Section 6, the cases of 2- and 3-qubit quantum signal-induced heap transform (QsiHT) are considered in detail with two encoding tables and quantum circuits for complex 2- and 3-qubit operations. The quantum circuit of a 4-qubit unitary operation is presented in Section 7. All roadmaps for 15 QsiHTs in the QR-decompisition of the 4-qubit operation (complex and real) are presented in Appendix A.
2. The Concept of the DsiHT
The DsiHT is the unitary transformation that is induced, or generated, by one or more signals [37]. The illustration of this transform when the transform is generated by a single signal is shown in Figure 1. A signal-generator is shown in Figure 1a. The input and output of the generated transform are shown in Figure 1b and Figure 1c, respectively.
To compose such a transform, different ways of processing the components of the generator can be used. We consider the case when the transform is composed sequentially by the series of 2-point operations. At each stage of composition, only two components and of signal will be processed, for instance, the components number and . These components can also be renewed during the calculations as well. By using these components, a 2-point operation, , will be generated, and then, it will be applied on component number and of the input signal , as shown in Figure 1. Thus, it is a two-level transformation. On the first level, the transforms are generated, and on the second level, they are applied on the input signal. Input signal can also be processed after generating the entire transform, DsiHT. We consider the simple case, when each 2-point transformation moves the energy of the input to one of its components. In other words, the transformation is defined as
(1)
or(2)
Here, the energy of the input is defined as or for the complex input.First, we consider real transformations defined by the Given rotation, , which is described in the matrix form as
(3)
The angle is calculated by , and if . The transformation in Equation (2) is described by(4)
Because of the property + after changing as , the Givens rotation in Equation (3) will result in the transform in Equation (4).
In this section, we describe the DsiHTs composed of the Givens rotations and apply them to real signals. The case of complex transformations and DsiHT is considered in Section 3. The main characteristic of the DsiHT is the path, that is, the order in which it is assembled from the basic 2-point rotations with one parameter (the angle) each. The angles are calculated from the generator. The set of these angles is called the angular representation of the generator and is denoted by [33,37]. In quantum computation, it is desired to compose operations only on adjacent bit planes to avoid additional permutations. Therefore, to apply the concept of the DsiHT in quantum computation and compose the quantum analog of this transform, the path of the transform is chosen as one that allows the composition of the transform by the rotations only on adjacent bit planes [24].
As an example, we consider the 8-point DsiHTs, which use two different paths. Figure 2 shows the so-called road map of the 8-point DsiHT and the quantum circuit of the analogue 3-qubit QsiHT.
The road map is the table with the 8-point generator in the first column, eight bit-planes in the second column, and the output of the transform in the last column. The transformation over the same generator moves the entire energy of to the first component, resulting in the following signal:
(5)
The road map shows seven operations, or butterflies, with two inputs and two outputs. The colors in circles for outputs 0 are in red. The blue color shows the output with the energy of the input. Nodes with blue and next to the right black color on the same bit plane are considered connected. Therefore, the connecting horizontal lines between them are not shown. All butterflies are numbered from top to bottom and left to right. On the first stage, the first four butterflies operate on the bit-planes (0,1), (2,3), (4,5), and (6,7). In the quantum circuits these four operations are described by four gates of rotation controlled by the first two qubits. The corresponding angles of rotations, are calculated as shown in Equation (3). On the second stage of calculation of the DsiHT, two butterflies are used on the renewed components of the generators, namely component numbers 0, 2, and 4, 6. The corresponding controlled gates of rotations and are shown in the circuit. These gates are controlled by qubit numbers 1 and 3. The last butterfly operates on the renewed component numbers 0 and 4. As a result the energy of the generator will be moved to the first output. It is the heap of the transform (shown in yellow circle) and is denoted by because this component was renewed three times. This butterfly is described by the rotation gate controlled by the last two qubits. The depth of this circuit is equal to 3, that is, to the number of stages composing the DsiHT. The circuit does not have permutations, only seven gates of rotation on adjacent bit-planes. Seven angles make up the angular representation of the generator . These angles plus the path are the key of the DsiHT. This transformation can be written in the matrix form as follows:
(6)
Here, the notation is used for the controlled rotation gate that operates on the biplanes and , .Now, we consider the 8-point DsiHT generated by the same generator but with another path. Figure 3 shows the road map of the new 8-point DsiHT and the corresponding quantum circuit of the 3-qubit QsiHT. Here, we also have seven butterflies, or rotations, and all operates on adjacent bit-planes. This 3-qubit QsiHT can be written in the matrix form as
(7)
In comparison with the road map in Figure 2, the 3-qubit DsiHT is calculated in five stages. It means that the quantum circuit has a depth of 5. Therefore, the circuit in Figure 2 with depth 3 can be considered more effective than the second circuit. In the future, we will also give preference to road maps that provide minimal computational depth.
Consider the generator The matrix of the 8-point DsiHT with the road map in Figure 2 can be written as
(8)
Here, the diagonal matrix is
(9)
The set of angles of rotation gates is equal to (in degrees)(10)
Now, we consider the 8-point DsiHT with the road map given in Figure 3. The matrix of this transform is equal to(11)
with the diagonal matrix(12)
The angular representation of the signal is the set of angles(13)
Both matrices of the DsiHT have 32 zero coefficients, they are unitary and(14)
and if we normalize the generator, then It means that the 3-qubit superposition(15)
will be transformed to the first basis state . The 3-qubit can be prepared by both transforms and , as . Here, denotes the transpose matrix. It follows from Equation (6), that the preparation of can be accomplished by the 3-qubit operation described as(16)
Here, we use the fact that for rotation gate . Figure 4 shows the quantum circuit for 3-qubit state preparation when using the first road map of the DsiHT.
3. Complex QsiHT
In this section, we describe the general case of the -point DsiHT and its quantum analogue, -qubit QsiHT, generated by complex signals, or -qubit superposition. As shown in [34], there are different complex matrices that can be used as the basis elements to compose the -point DsiHT. First, we consider the following 2 × 2 matrix:
(17)
Numbers and are complex. One coefficient of this matrix is a real number. The matrix is unitary, and its determinant is the complex number(18)
with The matrix product equals(19)
Consider the polar form of the numbers, and . Then, the matrix in Equation (17) can be written as
(20)
Denoting(21)
for angle ), we obtain the following:(22)
Therefore, this matrix can be represented as
(23)
This is the decomposition of the matrix by the phase shift, two -rotations, and one -rotation, that is,(24)
For the real numbers and , the matrix is
(25)
(26)
The phase shift gate can be removed from the decomposition in Equation (23) and the operation with the following matrix can be considered:
(27)
This is the decomposition of the matrix by two -rotations and one -rotation,(28)
Here, the vector-angle , and the angles and . The 2 × 2 matrix is defined as(29)
All coefficients of this matrix are complex numbers. The circuit element for the 1-qubit operation with matrix is shown in Figure 5.
Also, we consider the transform with the following unitary 2 2 matrix:
(30)
Transform moves the energy of the complex vector to the second output,
(31)
The following decomposition holds:
(32)
with the angle . Thus,(33)
where the vector-angle . The circuit element for the 1-qubit operation with this matrix is shown in Figure 6. It should be noted that because of this matrix can be written asConsider the complex generator with the energy . To generate the complex 8-point DsiHT, we will use the road map given in Figure 2. Each of seven butterflies in this road map will represent the corresponding complex gate 1:7, with three parameters and angles. The circuit of the 3-qubit complex QsiHT is given in Figure 7.
The angles of seven gates are given in Table 2.
The circuit is described by the following matrix equation:
(34)
As in the case of real rotations, the notation is used for the controlled gate that operates on the biplanes and , . This circuit of the 3-qubit QsiHT calculates the first basis state from the generator, written as the 3-qubit superposition(35)
That is, , or (1,0,0,…,0)’. The matrix of this transform is equal to(36)
The determinant of this matrix is equal to 1. As in the case of the real generator in Example 1, the number of zeros in this matrix is equal to 32 (the half of the size of the matrix).The matrix is unitary, the transpose matrix is the inverse matrix of the conjugate transpose,. Therefore, the 3-qubit preparation () can be accomplished by the 3-qubit gates as
(37)
Note that the gate inverse to is calculated by
(38)
Thus, . The triplets of angles for the inverse gates change as , .Figure 8 shows the quantum circuit for preparing the 3-qubit superposition , by using the first road map of the 8-point DsiHT. This circuit is composed of rotation gates and . These two gates, - and -rotations, together with the phase gate, compose the set of universal gates for 3-qubit operations. This circuit uses a maximum of 7 rotation gates and 14 gates .
The main characteristics of this quantum circuit are given in Table 3.
For the signal in Example 2, there are six zero angles for gates in Table 1. This means that the last three operations are rotations, . The circuit can be simplified. The full quantum circuit to initiate the 3-qubit state in Equation (35) is shown in Figure 9. The circuit contains seven rotation gates and eight gates . The total number of gates is 15.
4. DsiHT-Based QR Decomposition
In this section, we describe the QR decomposition of a square unitary matrix of size by the Givens rotations [34,38]. The unitary matrix is considered with real or complex coefficients. In this decomposition, the matrix is presented as , where is a unitary matrix composed of rotations, and is a diagonal matrix with coefficients lying on the unit circle. During this decomposition, the matrix is transformed sequentially into a diagonal matrix . DsiHTs are used in the QR decomposition of matrix . The first step of this decomposition is illustrated below, for an 8 unitary matrix,
(39)
The matrix diagonalization can be described by the following steps:
1.. The first DsiHT, denoted as is generated by the first column of the matrix , which we denote by This transform changes this column as
(40)
After multiplying the matrix of this DsiHT by matrix , the new matrix will have the form shown in Equation (39). Except the first point on the diagonal, all values of the first column and row are equal to 0.2.. The second 8-point DsiHT, denoted as is generated by the second column of the new matrix , which is denoted as This transform will change this column as
(41)
and other columns of the matrix as .3.. A similar 8-point DsiHT, , will be generated by the 3rd column of the new matrix and applied on it. If we denote this column as , then this transform will change this column as
(42)
and other columns of the matrix as .4.. This process is continued four more times, until matrix diagonalization is completed
(43)
Each of these seven 8-point DsiHTs can be defined with the fast path, as in the examples described above, which calculate these transforms only on adjacent bit planes.In the above, for , the transform generated by the vector does not change the first values of , as well as a vector on which it applies. That is, it processes only the remaining components. For instance, if ,
(44)
This 8-point DsiHT is generated under the condition,(45)
where is the norm of the vector, . Thus, the energy of the signal is moved to the third components ().These seven 8-point DsiHT with fast paths for the QR-decomposition of a matrix 8 8 are described in detail and with the quantum circuits in [24] for the real matrix . The QR decomposition is encoded, as shown in Table 4.
All butterflies (BF) and paths are shown in this table for all seven DsiHTs that are used in the decomposition. In other words, seven roadmaps are encoded in this table. For instance, we consider the transform . Five butterflies are used as follows. The butterflies are numbered from left to right. The first butterfly is encoded as , meaning that it operates on bit-planes 2 and 3, and the second output of the operation is zero (symbol ‘o’ is used). The energy of the input will be moved to the first output (symbol ‘*’ is used). This butterfly is the operation of rotation described in Equation (3). The butterfly number 4, which is encoded as , operates on bit-planes 4 and 6 and moves the energy of the input to the second output. The first output is zero. This is the rotation described in Equation (4). The remaining butterflies of numbers 2, 3, and 5 operate on bit-planes (4,5), (6,7), and (2,6), respectively. They are operations of rotation that move the energy of the inputs to the first component, as the first butterfly. The road map and the quantum circuit for the 3-qubit DsiHT, , for the real generator are given in Figure 10.
This encoded table shows that 20 gates and 8 gates are used for the decomposition of the matrix. The same encoded table can be used in the case when the matrix is complex. Only the above butterflies as real gates should be changed by the corresponding complex gates or . For instance, in the above case, the 1st butterfly will be changed by , and the firth butterfly should be changed to . The corresponding quantum circuit is given in Figure 11.
5. Two-Qubit Operations
In this section, we describe two QR-decompositions of 4 4 real matrix by the above method of DsiHT. First, we consider the encoded data of the decomposition, which is given in Table 5. The corresponding quantum circuit for the 2-qubit operation QR decomposition is given in Figure 12.
To simplify the notations in equation of such circuits, all rotation gates (and angles of rotations) are numbered as 1, 2, …, 7 from left to right. Therefore, the circuit in Figure 12 is described by the operation
(46)
and the diagonal matrix .Note that the road map for the first 4-point DsiHT, , can be changed, as shown in Table 6. Then, the quantum circuit for the corresponding decomposition of the 2-qubit operation will change, as shown in Figure 13,
(47)
and . This cicuit has a depth of 5, when the circuit in Figure 12 has a depth of 4. The angles and diagonal matrices for these decompositions of are different.Next, we consider the 2-qubit complex operations and describe a quantum circuit to calculate them by using only rotation gates.
Complex 2-Qubit Operations
For 4 4 complex matrix , the quantum circuit for the QR-decomposition by the first encoded table (Table 5) is shown in Figure 14. This circuit generalizes the circuit in Figure 12, which is given for a real matrix. There are five gates , and one gate The gates are numbered from left to right.
The same circuit of the decomposition operation, , is given in Figure 15 in a simplified form,
(48)
The QR-factorization of the unitary matrix results in a diagonal matrix with coefficeints lying on the unit circle. Therefore, the 3-qubit operation can be accomplished by inverting all six gates in Equation (48),
(49)
The inverse to the gate is calculated as .Thus, we obtain the circuit to calculate the 2-qubit operation This circuit is shown in Figure 16 and in more detail in Figure 17.
If we use the second encoded table, namely Table 6, for 2-qubit complex operation , then we obtain the circuit that is shown in Figure 18. Comparing this circuit with the one in Figure 16, one can notice the change in the part of the transform . Angles are also different for all 6 complex gates.
Consider the following complex unitary matrix:
(50)
with the determinant All angles in the DsiHT-based QR decomposition of matrix are shown in Table 7. The encoding table is considered to be Table 5. The diagonal matrix is equal to , which can be written with the phase gate as . The symbol is used for the Kronecker sum of matrices [1]. In the last gate of the tranform , two -rotations are the identity transforms, . This gate is -rotation gate .The same diagonal matrix is obtained when the QR-decomposition of the matrix is calculated by encoding Table 7. In this case, the set of angles of rotations changes as shown in Table 8.
One can note that there are more angles with simple rotations than in Table 7. Therefore, we chose the quantum circuit in Figure 18 for calculating the 2-qubit operation described by the matrix in Equation (50). In the first gate of the transformation , one -rotation is the identity transform, Also, on the 2nd stage of the DsiHT, , the vector-angle . The following holds for the rotation gates with such angles:
(51)
This operation is described by one rotation gate . Therefore, the circuit for the 2-qubit operation in Figure 18 can be simplified as shown in Figure 19. Here, we consider the angle and 180 This quantum circuit for this operation includes six -rotations, seven -rotations, and one phase gate.6. The Circuit for 3-Qubit Operation
The QsiHT-based QR decomposition of a unitary matrix 8 8 is accomplished by seven transforms in Equation (43). Therefore, the 3-qubit operation can be calculated as
(52)
This operation in the case where matrix is real is described in detail in [24]. The quantum circuit uses a maximum of 28 control -rotations and one phase gate for the diagonal matrix . All rotations are fulfilled on the adjacent bit planes because of the encoded Table 4. Therefore, the circuit does not use any permutation elements or CNOT gates. The same encoding table is used in the complex case of the matrix. The quantum circuit is shown in Figure 20. It uses rotation gates and the depth of the circuit is equal to 18 3 = 54. The numbers of rotation gates and depth for each 3-qubit QsiHT circuit element and its depth are in given in Table 9.It is considered that the depth of each complex gate and is equal to 3. In the case, when the operation is real, this number is counted as 1, and the depth of the circuit is equal to .
7. The Circuit for 4-Qubit Operation
In this section, we describe the circuit for calculating 4-qubit operations, which is defined by a complex unitary 16 16 matrix . The QR-decomposition is accomplished by fifteen 16-point DsiHTs in total on 120 adjacent biplanes. The information on this decomposition
(53)
is given in encoding Table 10.If we use this table for a real 4-qubit operation, the QR decomposition requires only 120 rotation gates. Therefore, the quantum circuit for this operation
(54)
requires a maximum of 120 rates plus one Pauli gate for the diagonal matrix with coefficients , if the last coefficient is .The road map for all 15 DsiHTs with fast paths are shown in Figure A1, Figure A2, Figure A3, Figure A4, Figure A5, Figure A6, Figure A7, Figure A8, Figure A9 and Figure A10 in Appendix A. The quantum circuit for these transforms are also given in these figures. As shown in Figure A9, the roadmap for the DsiHT, , is composed of the corresponding roadmap of the 3-qubit transform . In the circuit, we need only to add the circuit of the 3-qubit transform controlled by the first qubit. Similarly, the road maps for the last six DsiHTs, , when are composed of the corresponding road maps of the 3-qubit transforms . Therefore, the quantum circuits for these transforms, are composed of the circuits of the transformation controlled by the first qubit, as shown in Figure A10.
All transforms , when are defined with fast paths, that is, they are composed of rotations on adjacent bit-planes only. The circuits are given for the case when the matrix of the 4-qubit operation is real. In the complex case, these rotations are substituted by the complex gates or , as shown in the road maps. The total number of these gates is equal to 120. Among them, 40 gates are of type In all circuits, the gates are numbered from left to right. However, the numbers are shown only for gates. For instance, for the transformation , instead of rotation gate numbers 1–4, 9, 10, and 13, gates are used when drawing this circuit for the complex 4-qubit operation. The remaining seven rotations will be substituted by the corresponding gates.
All angles and of these 120 complex gates represents the table of keys of the 4-qubit operation . Such tables of keys are described in detail in examples for 2- and 3-qubit operation in [24]. In the general case when , an -qubit operation can be decomposed by () DsiHTs with fast path. The total number of and gates in the decomposition is equal to . For a real -qubit operation , the number of rotation gates is equal to .
In conclusion, we consider the work of Fedoriaka [23], where the QR decomposition was implemented with Gray code and fully controlled gates. We refer to this method as the X and fully controlled gate decomposition (XFCD). The corresponding code was implemented in Q# programming language and is publicly available (for detail, see [23]). The decomposition uses -rotation gates, phase gates, and X gates with matrix The comparison is shown in Table 11 for 3- and 4-qubit operations. We note that the XFCD was implemented for the special unitary operations, whose matrices have the determinant In general, for a unitary matrix . The proposed QsiHT-based QR decomposition method is used for any unitary operation. For special cases of -qubit operations, the number of gates may be smaller, and the above quantum circuits can be reduced, or simplified, as shown in [24] with the example of Dicke states [39].
The main advantage of the proposed QR decomposition by the DsiHT with fast paths is that
It does not require any permutations for any unitary gate in the quantum computation. It means that CNOT operations are not required.
A maximum of () Givens rotations are gates required to perform an -qubit operation with a unitary real matrix.
A maximum of () Givens rotation and () -rotation gates are required to perform an -qubit operation with a unitary complex matrix.
It gives us a simple (transparent) calculation quantum circuit.
Any -qubit operation can be generated by a table of keys.
It shows that - and -rotation plus global phase gate are a universal set of gates in quantum computation.
8. Conclusions
The QsiHT-based QR decomposition of a multi-qubit operation allows us to build quantum circuits without any permutations. All QsiHTs in the decomposition of the complex matrix use the fast paths. This is illustrated by the roadmaps given in the examples of 3- and 4-qubit operations. The corresponding quantum circuits for the matrix decomposition and calculation are described in detail. The presented method can also be generalized for quantum circuits to compute -qubit operations, when . The cases of a unitary operation with real and complex matrices are considered. For any -qubit operation, a maximum of ) controlled -rotation gates are only used for real operation. For complex n-qubit operation, each -rotation is combined with two -rotation gates. No permutations, including CNOTs, are used. In future works, we plan to present a universal methodology to generate any -qubit QsiHT-based QR decomposition circuit beyond 4 qubits by developing automated layer-selection algorithms for the -qubit QsiHT.
Not applicable.
Not applicable.
The data presented in the current study are available from the author upon request.
The author declares no conflicts of interest.
The following abbreviations are used in this manuscript:
DsiHT | Discrete signal-induced Heap transform |
QsiHT | Quantum signal-induced Heap transform |
QFT | Quantum Fourier transform |
QR | QR decomposition of the matrix |
CSD | Cosine-sine decomposition |
BP | Bit plane |
BF | Butterfly |
Footnotes
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Figure 1 Two-level DsiHT,
Figure 2 The road map and the circuit for the 3-qubit QsiHT.
Figure 3 The second road map and the circuit for the 3-qubit QsiHT,
Figure 4 The circuit for preparing the 3-qubit state
Figure 5 The circuit element for 1-qubit operation
Figure 6 The circuit element for the 1-qubit gate
Figure 7 The 3-qubit complex QsiHT.
Figure 8 The general circuit for preparing a 3-qubit state
Figure 9 The circuit for preparing a 3-qubit state
Figure 10 The road map and circuit for the 3-qubit real QsiHT on bit-planes 2–7.
Figure 11 The circuit for the 3-qubit complex QsiHT on bit-planes 2–7.
Figure 12 The first circuit for the 2-qubit decomposition of the operation.
Figure 13 The second circuit for the 2-qubit decomposition of the operation
Figure 14 The quantum circuit for the decomposition of a 2-qubit complex gate
Figure 15 The first quantum circuit for the decomposition of a 2-qubit complex operation
Figure 16 The quantum circuit for the 2-qubit complex gate
Figure 17 The quantum circuit for the operation of a 2-qubit complex gate
Figure 18 The quantum circuit for the 2-qubit complex gate
Figure 19 The quantum circuit for the operation of a 2-qubit complex operation with the matrix
Figure 20 The quantum circuit for the 3-qubit complex operation
Number of CNOTs for
| | | | | | 7 |
---|---|---|---|---|---|---|
QR [ | 4 | 64 | 536 | 4156 | 22,618 | 108,760 |
CSD [ | 8 | 48 | 224 | 980 | 3968 | 16,128 |
QSD (optimized) [ | 3 | 20 | 100 | 444 | 1868 | 7660 |
Lower bounds [ | 3 | 14 | 61 | 252 | 1020 | 4091 |
QR by QsiHT | 0 | 0 | 0 | 0 | 0 | 0 |
The angles of the rotations in the circuit of
Gate | | | | |
---|---|---|---|---|
| | | | |
| −120.9638 | | | 2 |
| | | | 3 |
| | | | |
| | | | 5 |
| | | 0 | |
| | | | 7 |
Characteristic of the circuit for the 3-qubit preparation.
Method | # Rotation Gates | # | # | # Permutations/CNOTs | # All Gates | Depth |
---|---|---|---|---|---|---|
QsiHT | 21 | 7 | 14 | 0 | 21 | 8 |
The encoded table of seven QsiHTs by the fast paths in the 3-qubit QR decomposition.
QsiHT | #BPs | BFs | ||||||
---|---|---|---|---|---|---|---|---|
| 7 | | | | | | | |
| 6 | | | | | | | |
| 5 | | | | | | ||
| 4 | | | | | |||
| 3 | | | | ||||
| 2 | | | |||||
| 1 | |
The encoded table for the 2-qubit QR decomposition.
QsiHT | #BPs | BFs | ||
---|---|---|---|---|
| 3 | | | |
| 2 | | | |
| 1 | |
The second encoded table for the 2-qubit QR decomposition.
QsiHT | #BPs | BFs | ||
---|---|---|---|---|
| 3 | | | |
| 2 | | | |
| 1 | |
The angles of the rotations in the circuit of
| | | | |
---|---|---|---|---|
| | | | |
| | | 2 | |
| | | 3 | |
| | | | |
| | | 2 | |
| | | | |
The angles of the rotations in the circuit of
| | | | |
---|---|---|---|---|
| | | | |
| | | 2 | |
| | | 3 | |
| | | | |
| | | 2 | |
| | | | |
Data of the 3-qubit QsiHT-based circuit for a 3-qubit complex operation.
QsiHT | # | # | # Rotations | # Non-Adjacent BPs | # | # | Depth |
---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 0 | 1 | 0 | 3 |
| 2 | 4 | 6 | 0 | 1 | 1 | 6 |
| 3 | 6 | 9 | 0 | 3 | 0 | 6 |
| 4 | 8 | 12 | 0 | 1 | 3 | 9 |
| 5 | 10 | 15 | 0 | 4 | 1 | 9 |
| 6 | 12 | 18 | 0 | 3 | 3 | 12 |
| 7 | 14 | 21 | 0 | 7 | 0 | 9 |
Total | 28 | 54 | 84 | 0 | 20 | 8 | 54 |
The encoding table of all fifteen QsiHTs by the fast paths, which use the 4-qubit QR decomposition.
| # | BPs | |||||||
---|---|---|---|---|---|---|---|---|---|
| 15 | | | | | | | | |
| | | | | | | |||
| 14 | | | | | | | | |
| | | | | | ||||
| 13 | | | | | | | | |
| | | | | |||||
| 12 | | | | | | | | |
| | | | ||||||
| 11 | | | | | | | | |
| | | |||||||
| 10 | | | | | | | | |
| | ||||||||
| 9 | | | | | | | | |
| |||||||||
| 8 | | | | | | | | |
| 7 | | | | | | | | |
| 6 | | | | | | | ||
| 5 | | | | | | |||
| 4 | | | | | ||||
| 3 | | | | |||||
| 2 | | | ||||||
| 1 | | Total # | 120 BPs |
Comparison of circuits for two methods of QR decomposition.
Method | Gray Code | # | # | # Permutation/X | # | # All Gates | Depth |
---|---|---|---|---|---|---|---|
| |||||||
QsiHT | | 28 | 56 | 0 | 1 | 85 | 3 |
XFCD | | 28 | 56 | 28 | 1 | 113 | … |
| |||||||
QsiHT | | 120 | 240 | 0 | 1 | 361 | 3 |
XFCD | | 120 | 240 | 130 | 1 | 491 | … |
Appendix A
Each road map with circuit shown here describes the corresponding 16-point DsiHT, or 4-qubit QsiHT, used in the decomposition of the 4-qubit operations.
Figure A1 The road map and the quantum circuit for the 8-qubit QsiHT,
Figure A2 The road map and the circuit for the 4-qubit QsiHT,
In the roadmap of
Figure A3 The road map and the circuit for the 4-qubit QsiHT,
In the roadmap in
Figure A4 The road map and the circuit for the 4-qubit QsiHT,
Figure A5 The road map and the circuit for the 4-qubit QsiHT,
Figure A6 The road map and the circuit for the 4-qubit QsiHT,
Figure A7 The road map and the circuit for the 4-qubit QsiHT,
Figure A8 The road map and the circuit for the 4-qubit QsiHT,
Figure A9 The road map and the circuit for the 3-qubit QsiHT,
Figure A10 The circuit elements for the 4-qubit QsiHTs,
1. Nielsen, M.A.; Chuang, I.L. Quantum Computation and Quantum Information; Cambridge University Press: Cambridge, UK, 2000.
2. Rieffel, E.G.; Polak, W.H. Quantum Computing: A Gentle Introduction; The MIT Press: Cambridge, MA, USA, 2011.
3. Deutsch, D.; Barenco, A.; Ekert, A. Universality in quantum computation. Proc. R. Soc. Lond. A Math. Phys. Sci.; 1995; 449, pp. 669-677.
4. Barenco, A.; Bennett, C.H.; Cleve, R.; DiVincenzo, D.P.; Margolus, N.; Shor, P.; Sleator, T.; Smolin, J.A.; Weinfurter, H. Elementary gates for quantum computation. Phys. Rev. A; 1995; 52, pp. 3457-3467. [DOI: https://dx.doi.org/10.1103/PhysRevA.52.3457] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/9912645]
5. Knill, E. Approximation by Quantum Circuits; LANL Rep. LAUR-95-2225 Los Alamos National Laboratory: Los Alamos, NM, USA, 1995.
6. Pratt, W.K. Digital Image Processing; 3rd ed. John Wiley & Sons, Inc.: New York, NY, USA, 2001.
7. Gonzalez, R.; Woods, R. Digital Image Processing; 2nd ed. Prentice-Hall: Upper Saddle River, NJ, USA, 2002.
8. Björck, A. Solving Linear Least Squares Problems by Gram-Schmidt Orthogonalization. BIT Numer. Math.; 1967; 7, pp. 1-21. [DOI: https://dx.doi.org/10.1007/BF01934122]
9. Householder, A.S. Unitary Triangulation of a Nonsymmetric Matrix. J. ACM; 1958; 5, pp. 339-342. [DOI: https://dx.doi.org/10.1145/320941.320947]
10. Rutishause, H. Simultaneous Iteration Method for Symmetric Matrices. Handbook for Automatic Computation: Linear Algebra; Bauer, F.L. Springer: Berlin/Heidelberg, Germany, 2017; Volume 186.
11. Golub, G.H.; Van Loan, C.F. Matrix Computations; 3rd ed. Johns Hopkins Press: Baltimore, MD, USA, 1996.
12. Bindel, D.; Demmel, J.; Kahan, W.; Marques, O. On Computing Givens Rotations Reliably and Efficiently; LAPACK Working Note 148, UT-CS-00-449 University of Tennessee: Knoxville, TN, USA, 2001.
13. Demmel, J.; Grigori, L.; Hoemmen, M.; Langou, J. Communication-optimal parallel and sequential QR and LU factorizations. SIAM J. Sci. Comp.; 2012; 34, pp. 206-239. [DOI: https://dx.doi.org/10.1137/080731992]
14. Deutsch, D. Quantum computational networks. Proc. R. Soc. Lond. A Math. Phys. Sci.; 1989; 425, pp. 73-90.
15. Vartiainen, J.J.; Möttönen, M.; Salomaa, M.M. Efficient decomposition of quantum gates. Phys. Rev. Lett.; 2004; 92, 177902. [DOI: https://dx.doi.org/10.1103/PhysRevLett.92.177902] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/15169192]
16. Tseng, C.C.; Hwang, T.M. Quantum circuit design of 8 × 8 discrete Hartley transform. Proceedings of the 2004 IEEE International Symposium on Circuits and Systems (ISCAS); Vancouver, BC, Canada, 23–26 May 2004; III-397.
17. Plesch, M.; Brukner, C. Quantum state preparation with universal gate decompositions. arXiv; 2011; arXiv: 1003.5760v2[DOI: https://dx.doi.org/10.1103/PhysRevA.83.032302]
18. Zhang, X.M.; Li, T.; Yuan, X. Quantum state preparation with optimal circuit depth: Implementations and applications. arXiv; 2023; arXiv: 2201.11495v4[DOI: https://dx.doi.org/10.1103/PhysRevLett.129.230504] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/36563219]
19. Volya, D.; Mishra, P. State preparation on quantum computers via quantum steering. arXiv; 2023; arXiv: 2302.13518v3
20. Pinto, D.F.; Friedrich, L.; Maziero, J. Preparing general mixed quantum states on quantum computers. arXiv; 2024; arXiv: 2402.04212
21. Bergholm, V.; Vartiainen, J.J.; Möttönen, M.; Salomaa, M.M. Quantum circuits with uniformly controlled one-qubit gates. arXiv; 2004; [DOI: https://dx.doi.org/10.48550/arXiv.quant-ph/0410066]
22. Mikko, M.; Vartiainen, J.J. Decompositions of general quantum gates. arXiv; 2005; arXiv: quant-ph/0504100v1
23. Fedoriaka, D. Decomposition of unitary matrix into quantum gates. arXiv; 2025; arXiv: 2501.07786
24. Grigoryan, A.M.; Gomez, A.; Espinoza, I.; Agaian, S.S. Signal-Induced Heap Transform-Based QR-Decomposition and Quantum Circuit for Implementing 3-Qubit Operations. Information; 2025; 16, 466. [DOI: https://dx.doi.org/10.3390/info16060466]
25. Yoran, N.; Short, A. Efficient classical simulation of the approximate quantum Fourier transform. Phys. Rev. A; 2007; 76, 042321. [DOI: https://dx.doi.org/10.1103/PhysRevA.76.042321]
26. Marquezinoa, F.L.; Portugala, R.; Sasse, F.D. Obtaining the quantum Fourier transform from the classical FFT with QR decomposition. J. Comput. Appl. Math.; 2014; 235, pp. 74-81. [DOI: https://dx.doi.org/10.1016/j.cam.2010.05.012]
27. Cooley, J.W.; Tukey, J.W. An algorithm for the machine calculation of complex Fourier series. Math. Comput.; 1965; 19, pp. 297-301. [DOI: https://dx.doi.org/10.1090/S0025-5718-1965-0178586-1]
28. Li, H.S.; Fan, P.; Xia, H.; Song, S.; He, X. The quantum Fourier transform based on quantum vision representation. Quantum Inf. Process.; 2018; 17, 333. [DOI: https://dx.doi.org/10.1007/s11128-018-2096-2]
29. Grigoryan, A.M.; Agaian, S.S. Paired quantum Fourier transform with log2N Hadamard gates. Quantum Inf. Process.; 2019; 18, 217. [DOI: https://dx.doi.org/10.1007/s11128-019-2322-6]
30. Shende, V.V.; Bullock, S.S.; Markov, I.L. Synthesis of quantum-logic circuits. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst.; 2006; 25, pp. 1000-1010. [DOI: https://dx.doi.org/10.1109/TCAD.2005.855930]
31. Möttönen, M.; Vartiainen, J.J.; Bergholm, V.; Salomaa, M.M. Quantum circuits for general multiqubit gates. Phys. Rev. Lett.; 2004; 93, 130502. [DOI: https://dx.doi.org/10.1103/PhysRevLett.93.130502] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/15524693]
32. Shende, V.V.; Markov, I.L.; Bullock, S.S. Minimal universal two-qubit controlled-not based circuits. Phys. Rev. A At. Mol. Opt. Phys.; 2004; 69, pp. 062321-062329. [DOI: https://dx.doi.org/10.1103/PhysRevA.69.062321]
33. Grigoryan, A.M. New method of Givens rotations for triangularization of square matrices. J. Adv. Linear Algebra Matrix Theory (ALAMT); 2014; 4, pp. 65-78. [DOI: https://dx.doi.org/10.4236/alamt.2014.42004]
34. Grigoryan, A.M. Effective methods of QR-decompositions of square complex matrices by fast discrete signal-induced heap transforms. Adv. Linear Algebra Matrix Theory (ALAMT); 2023; 12, pp. 87-110. [DOI: https://dx.doi.org/10.4236/alamt.2022.124005]
35. Grigoryan, A.M.; Grigoryan, M.M. Nonlinear approach of construction of fast unitary transforms. Proceedings of the 2006 40th Annual Conference on Information Sciences and Systems; Princeton, NJ, USA, 22–24 March 2006; pp. 1073-1078. [DOI: https://dx.doi.org/10.1109/CISS.2006.286625]
36. Grigoryan, A.M.; Agaian, S.S. Quantum Image Processing in Practice: A Mathematical Toolbox; WILEY: Hoboken, NJ, USA, 2025; 320.
37. Grigoryan, A.M.; Grigoryan, M.M. Brief Notes in Advanced DSP: Fourier Analysis with MATLAB; CRC Press, Taylor, and Francis Group: Boca Raton, FL, USA, 2009.
38. Cybenko, G. Reducing quantum computations to elementary unitary operations. Comput. Sci. Eng.; 2001; 3, pp. 27-32. [DOI: https://dx.doi.org/10.1109/5992.908999]
39. Bärtschi, A.; Eidenbenz, S. Deterministic preparation of Dicke states. Proceedings of the International Symposium on Fundamentals of Computation Theory; Copenhagen, Denmark, 12–14 August 2019.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2025 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
The article presents the quantum signal-induced heap transform (QsiHT) method of the QR-decomposition of multi-qubit operations. This transform can be generated by a given signal, by using different paths, or orders, of processing the data. We propose using the concept of the fast path of calculation of the QsiHT and applying such transforms on each stage of the matrix decomposition. This allows us to build quantum circuits for multi-qubit unitary operation without permutations. Unitary operations with real and complex matrices are considered. The cases of 3- and 4-qubit operations are described in detail with quantum circuits. These circuits use a maximum of 28 and 120 Givens rotation gates for 3- and 4-qubit real operations, respectively. All rotations are performing only on adjacent bit planes. For complex unitary operation, each of the Givens gates is used in pairs with two Z-rotation gates. These two types of rotations and the global phase gate are the universal gate set for multi-qubit operations. The presented approach can be used for implementing quantum circuits for
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer