Tridiagonal matrix decomposition for Hamiltonian simulation on a quantum computer
Abstract
The construction of quantum circuits to simulate Hamiltonian evolution is central to many quantum algorithms. State-of-the-art circuits are based on oracles whose implementation is often omitted, and the complexity of the algorithm is estimated by counting oracle queries. However, in practical applications, an oracle implementation contributes a large constant factor to the overall complexity of the algorithm. The key finding of this work is the efficient procedure for representation of a tridiagonal matrix in the Pauli basis, which allows one to construct a Hamiltonian evolution circuit without the use of oracles. The procedure represents a general tridiagonal matrix by systematically determining all Pauli strings present in the decomposition, dividing them into commuting subsets. The efficiency is in the number of commuting subsets . The method is demonstrated using the one-dimensional wave equation, verifying numerically that the gate complexity as a function of the number of qubits is lower than the oracle based approach for and requires half the number of qubits. This method is applicable to other Hamiltonians based on the tridiagonal matrices.
I Introduction
Simulation of quantum Hamiltonians is one of the first directions that can potentially demonstrate quantum advantage [1]. Over the years this field has evolved and great progress has been made since the first description [2]. The latest developed techniques, such as the quantum walk algorithm [3], simulation by qubitization [4], and others [5, 6, 7, 8], are often described in terms of calls to an oracle, but the construction of the oracle is usually not specified. In a notable exception from the above, the oracle is constructed in Ref. [9] and the constant factor in gate scalability is calculated.
The standard approach to implement a circuit for Hamiltonian simulation on a quantum computer is to decompose the Hamiltonian into a sum of Pauli strings (tensor product of Pauli matrices) and approximate the operator with product formulas [10, 11]. With a naive approach, the number of Pauli strings to consider is if the size of is . It was conjectured that modeling using this approach is more efficient if one can group the resulting Pauli strings into commuting sets [12, 13, 14]. It was shown that the set of all Pauli operators (without identity) of size can be divided into different subsets, each consisting of internally commuting elements [15].
The problem of partitioning a Hamiltonian decomposition in the Pauli basis featuring sets of commuting operators was studied in the framework of simultaneous measurements [16]. Typically, this problem may be solved by building a graph with Pauli strings as nodes, connected if they commute, i.e., the clique problem. Further, it can be reduced to the graph-coloring problem which is NP-Complete, but heuristics exist [17].
In this work we consider Hamiltonians of a special kind which are constructed using tridiagonal matrices. Tridiagonal matrices come to light in many different areas of mathematical and applied sciences, commonly in the discretization of differential equations [18, 19], and are used to represent discretized versions of differential operators in quantum computing.
The proposed procedure decomposes tridiagonal matrices into internally commuting subsets of Pauli strings, each subset having size . It also provides the coefficients (weights) for each Pauli string in the decomposition. It automatically leverages the structure of the tridiagonal matrix to remove the majority of the redundant Pauli strings with zero coefficients and provides an upper bound for the number of Pauli strings with non-zero weights. Moreover, it contains a formula for calculation of the weights separate from the symbolic generation of Pauli strings.
We illustrate our method using the Hamiltonian of the one-dimensional wave equation as an example and numerically show the dependence of the number of gates on the number of qubits. We also show that our method for qubits has fewer gates for practical applications than one with the oracle implementation, despite worse theoretical scaling.
This work is organized as follows. In Sec. II we introduce the notation and useful mathematical constructs. The decomposition algorithm for an arbitrary tridiagonal matrix is described in Section III, followed by specific variants for real and real symmetric tridiagonal matrices. Sec. IV is a special case of a symmetrized matrix constructed from a real matrix such that both and are on the anti-diagonal. In Sec. V we focus on Hamiltonian simulation, while in Sec. VI the method is illustrated with an example of the one-dimensional wave equation. We defer longer proofs to the Appendix.
II Notation and definitions
The Pauli matrices constitute a basis for the complex vector space of matrices and comprise operators , where
A tensor product of several Pauli matrices is called a Pauli string. The length of a Pauli string is the number of Pauli operators in the string, and it is exactly when decomposing a matrix. We denote the set of Pauli strings of length as .
The Pauli basis decomposition of an arbitrary matrix is given by
(1) |
where is the number of terms in the decomposition and in general. Hereinafter we omit the tensor sign when writing Pauli strings (e.g., is abbreviated as ).
Manipulation of Pauli strings is possible with bit arithmetic. For a single bit we use the following notation for powers:
where is XOR (addition modulo 2). Definitions for strings of bits , where , are summarized in Table 1.
Notation | Definition |
---|---|
Negation, | |
Exponentiation, | |
Inner product, | |
Kronecker delta, | |
For we define the vector as
(2) |
Further, we define the function that converts non-negative integers to binary
(3) |
Note that BIN, as well as the bit string are encodings of an integer, where the leftmost bit encodes the lower register. For example, the string is the encoding of .
To express Pauli strings with and matrices we use bit strings and definitions in Table 1:
(4) | ||||
(5) |
An arbitrary Pauli string can be defined as the image of the extended Pauli string operator (Walsh function)
as follows:
(6) |
with the ordinary matrix product between and . It can be seen that the Walsh function is bijective. Thus, each Pauli string can be encoded with a unique pair and (1) can be rewritten as
(7) |
where . There is one-to-one correspondence between from (1) and in (7).
By we denote the th Cartesian product of the set with elements interpreted as Pauli strings. For example, . As before, the product is abbreviated .
III Tridiagonal matrix decompositions
We consider an arbitrary tridiagonal matrix , where of the following form:
(8) |
Proposition 1 provides the maximal possible set of Pauli strings with nonzero coefficients in the decomposition of an arbitrary tridiagonal matrix with complex entries. We limit our consideration to tridiagonal matrices with only real entries (proposition 3) and further we consider only tridiagonal symmetric real matrices () in corollary 2 and provide the maximal possible set of Pauli strings with nonzero coefficients in each case, as well as provide a possible partitioning of these strings into sets of internally commuting operators.
III.1 Pauli strings present in the decomposition
We formulate the following proposition regarding the decomposition of an arbitrary tridiagonal matrix with complex entries shown in (8) into Pauli strings:
Proposition 1 (Decomposition of an arbitrary tridiagonal matrix).
An arbitrary tridiagonal matrix , where , can have Pauli strings in its decomposition with nonzero coefficients only from the union of the following disjoint sets with total cardinality of
0. | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1. | |||||||||||
2. | |||||||||||
3. | |||||||||||
n-1. | |||||||||||
n. | |||||||||||
The first step in the procedure for decomposition of a tridiagonal matrix in the Pauli basis (1) consists of symbolic generation of Pauli strings starting from all diagonal operators to all antidiagonal operators by replacing one diagonal operator on the right with an antidiagonal operator at each step . The decomposition weights can be calculated later, based on the selected Pauli strings, see Sec. III.2. Note that the cardinality of the union in proposition 1 is based on the structure of an arbitrary tridiagonal matrix; weight calculation may result in fewer Pauli strings in the decomposition.
We denote the sets in proposition 1 as
(9) |
When () the first (second) tensor product is omitted. Each step generates Pauli strings, and we divide these strings into two sets named and , where indicates that the number of operators in every Pauli string in the set is even and indicates that this number is odd. When , there are no operators, so we will denote it as . Note that each corresponds to a row labeled by in proposition 1.
The bit string notation from Sec. II provides a concise description of sets where the correspondence to is given by bit string as follows:
(10) |
where is a selector with bits set to one and the following bits set to zero, like: , formally:
(11) |
The bit string corresponds to such that the first positions of the bit string set to one, and the remaining () positions are all zeros. To generate each subset , traverses all numbers and the generated Pauli strings are sorted according to the outcome of .
Each of the subsets contains commuting Pauli strings due to the following proposition:
Proposition 2 (Commutativity criterion).
Let and be two Pauli strings of length , where . Then, and commute iff
(12) |
Corollary 1.
Let and be two Pauli strings of length , where . Let the parity of operators in both strings be equal, then and commute.
Proposition 2 and corollary 1 are proven in Appendix Section A.2. We reach a conclusion that and each are internally commuting subsets. Therefore, the general matrix decomposition will have internally commuting subsets.
Analogous to the general case, for a real tridiagonal matrix the following proposition will hold:
Proposition 3 (Real tridiagonal matrix).
A real tridiagonal matrix , where , can have Pauli strings in its decomposition with non-zero coefficients only from the union of disjoint internally commuting sets , of which have a cardinality of each and one of which is given by and has a cardinality of The cardinality of the union is
For the case of a real symmetric tridiagonal matrix the symmetry will enable additional cancellations in the decomposition, such that only may be present. This is reflected in the following corollary:
Corollary 2 (Real symmetric tridiagonal matrix).
A real symmetric tridiagonal matrix , where , can have Pauli strings in its decomposition with non-zero coefficients only from the union of disjoint internally commuting sets, of which are given by and have a cardinality of each and one of which is given by and has a cardinality of The cardinality of the union is
For convenience we omit the superscript in and omit the , when the length and parity is clear from context.
III.2 Decomposition weights
In order to calculate the coefficients (weights) of the proposed decomposition it is easier to separate the calculation of the weights for the “diagonal” and “off-diagonal (anti-diagonal)” subsets. The matrix can be written as a sum of the diagonal and off-diagonal matrices: . The diagonal matrix after decomposition consists of Pauli strings of length in the subset containing only and operators. The coefficients of corresponding within this first internally commuting set can be calculated as
(13) |
where is a diagonal element of the matrix as in (8) and is , .
For the off-diagonal matrix , the weights of the decomposition [see (7)] may be calculated for each in a subset given in (9) as follows:
(14) |
where corresponds to (10), and and are the off-diagonal elements of matrix as in (8). The expression is calculated as the bit-wise XOR of bit string with the inverted bit string .
III.3 Visualization of commuting subsets
The elements of matrix can be used to calculate the coefficients of Pauli strings in its decomposition using (14). In Fig. 1 we show the correspondence between elements of and subsets which contain the corresponding Pauli strings. The diagonal consists of Pauli strings containing only and operators and corresponds to . For the off-diagonal elements we are left with subsets specified in (9). To show the correspondence, consider the off-diagonal component of a real symmetric matrix for . For a symmetric matrix (see corollary 2) we have the following subsets with size :
Figure 1 illustrates how these subsets correspond to the elements of a matrix . Each is given a color and the structure is apparent. The length of the anti-diagonal segment is equal to , where is the number of the Pauli operators on the right in the expression.
The said structure appears not only for real symmetric matrices. It follows from the associativity of the tensor product, where we take the matrices from the set on the left with matrices from the set on the right. For each Pauli string from the subset we have
(15) |
where is a diagonal matrix of size and is an anti-diagonal matrix of size .
IV Decomposition for a symmetrized matrix
A Hermitian matrix can be constructed from any matrix as:
(16) |
As before, consider the case where the matrix is tridiagonal of size , therefore the size of is . Here we assume to be real and therefore is symmetric. The following statement holds:
Corollary 3.
The number of terms in the decomposition of a symmetric matrix (16) is equal to the number of terms in the decomposition of the real matrix and is bounded above by . The Pauli strings in the decomposition of can be partitioned into the following subsets of commuting strings:
where the expression selects or such that the number of operators in each Pauli string is even.
The weights of the decomposition of may be calculated using formulae (13) and (14). For any square matrix with its Pauli decomposition given in (7) the following equality holds:
(17) |
for details see Appendix A.3.
Consider a symmetric matrix (16) consisting of and with as an example. According to corollary 3, Pauli strings in decomposition of can be arranged into the following sets:
, | |||||||||
, | |||||||||
, | |||||||||
, | |||||||||
. |
These are similar to subsets which arise in the decomposition of a real symmetric matrix , but now the size of each subset is . This follows from the fact that the terms with an odd number of operators, which were zero for the real symmetric case, now appear in the decomposition because the operator can be selected as the leading term to make the number of operators even (see corollary 2). Figure 2 shows which elements correspond to which set for the matrix of size .
V Circuit for Hamiltonian Simulation
We have shown the two steps in matrix decomposition, namely the generation of Pauli strings based on matrix structure and the calculation of decomposition weights. Importantly, Pauli strings are assembled into commuting sets. The information about commuting sets may serve to reduce the circuit complexity of Hamiltonian simulation [13] and to accelerate simulation of quantum dynamics on a classical computer [12]. In this section we use this approach to construct a circuit for Hamiltonian simulation.
The parameters that should be taken into account when implementing the evolution of the Hamiltonian [4] include the number of system qubits , evolution time , target error , and how information on the Hamiltonian is accessed by the quantum computer. Our circuit does not require additional qubits, and it does not use oracles to access information. As we organized a large number of Pauli strings into an exponentially smaller number of commuting subsets we could expect improvement in the accuracy according to the Trotterization formula.
The task of Hamiltonian simulation is to implement the operator on a quantum device. For an operator represented by a tridiagonal or symmetrized (as discussed in Section IV) matrix the quantum circuit is constructed as follows.
First we generate internally commuting sets of Pauli strings needed for the decomposition of . These strings can be simultaneously diagonalized [12, 13]. As an example, Table 2 contains the diagonalization operators for the real symmetrical tridiagonal matrix of size discussed in Section III.3. Note that is an identity since the set is already diagonal. These procedures, i.e. the generation of the commuting sets of Pauli strings and optional simultaneous diagonalization are determined by the tridiagonal matrix structure. These steps do not need to be repeated when the matrix changes values, making this approach suitable for use in variational algorithms [20, 21].
Simultaneous diagonalization operators for subset | |
---|---|
When a quantum state evolves in time under the action of and the matrix is represented in Pauli basis as in formula (1) [or, equivalently, as in (7)] the Lie-Trotter product formula [10] and its higher order variants [11] should be implemented taking the internally commuting sets into account. Given the time evolution governed by the Hermitian and the number of Trotter repetitions , using our decomposition we have:
(18) |
where are renumbered Pauli strings from subsets defined in (10), which contain up to terms each. The approximation is constructed with a Lie-Trotter product formula for internally commuting sets of Pauli strings, and the accuracy can be estimated as
(19) |
where denotes the spectral norm. The expression (18) can be diagonalized as
(20) |
where is the diagonalization operator for each subset . The number fixes the string , and the inner summation over covers the commuting subset as in (10). The operator is a diagonal operator corresponding to . It is important to note that the coefficients remain the same after diagonalization, or in other words, diagonalization depends only on the structure of the matrix (i.e., depends only on the Pauli subset) and does not depend on the values of the matrix elements. The computation of is done by using Clifford algebras [12, 13]. The operators consist of the combinations of the single-qubit Hadamard operators and the two-qubit and operators; number of gates in scales as , where is number of qubits.
It can be seen that in order to evaluate the propagator as in (18), (20) one has to compute the coefficients and implement diagonal exponents . The coefficients can be computed by using formulae (13) and (14) and in order to implement diagonal exponents one can use the results from [22] where it is shown that the gate count for a circuit which implements the diagonal exponent can be reduced to gates with , without ancillary qubits.
Combining all the results together we obtain gate complexity estimated as since for one Trotter step for each of commuting sets one needs to implement , and diagonal exponents. When considering the Trotter formula of an arbitrary order , each Trotter step will contain times more gates, but the accuracy will be achieved in fewer steps . In work [11] the Trotterization error considered by leveraging information about commutation and the following scaling is given with and , where are anti-Hermitian (which is the case since simulation of is considered in [11]). It is an interesting question whether it is possible to obtain some tight upper bound for . For now, we will use scaling provided by authors in [23], i.e. , where . Note that in this formula can be considered as the sum of matrices formed from commuting sets. Thus and resulting number of gates is given by
(21) |
This scaling can be made more accurate by taking into account information about the commuting sets. This can be seen for the case where all Pauli strings commute, making the Trotter error equal to zero. It is possible to find some order of Pauli strings that will reduce the error, but since the number of all possible combinations grows exponentially, this is a difficult task [24].
VI Quantum simulation example: Solving the wave equation
Tridiagonal matrices arise when discretizing derivatives. For example, the solution of the heat equation may be written as [19]
where is real symmetric tridiagonal matrix as in Section III.
Another example is the wave equation, considered here in more detail. Wave equation in one dimension with amplitude and speed defined in the interval is given by:
(22) |
We consider the case of the Dirichlet boundary conditions and set the initial conditions for and as follows:
(23) |
Following Costa et al. [25] we reduce (22) to the Schrödinger equation. Thus, consider the Hamiltonian in the following form ( is space discretization step):
(24) |
which leads to the Schrödinger equation (we use natural units such that ) with a two component quantum state
This recovers the original (discretized) wave equation (22) if , where is the Laplacian giving an approximation of the second order space derivative. To apply the method proposed in this work, we need the matrix to be square and have the size , so we slightly change the matrix proposed by Costa et al. [25] by writing the Dirichlet boundary conditions explicitly and we have also incorporated into this matrix:
The wave speed values with result from the discretization of the speed profile . The resulting Hamiltonian has the form described in Section IV. Based on (17) the coefficients of the decomposition are given by:
(25) | ||||
where as defined in (11).
Note that with our decomposition the expansion weights contain wave speeds explicitly. Therefore this provides a method to solve partial differential equations with variable coefficients (piece-wise constant over the discretization step ), since decomposition can be done only once and weights recalculated.
We have implemented the solution for wave equation and use it with a constant speed to determine the number of Trotter steps and the corresponding total number of gates needed to reach the set accuracy (evolution time is ). This is shown in Figure 3 as function of the number of qubits supporting discretization .
The gate complexity of our algorithm for solving the wave equation is calculated as
(26) |
using and for is shown with a solid line in Figure 3. The dashed lines in Figure 3 represent manual approximation to experimental points with
(27) | ||||
and the constant factor
The actual number of gates scales better than the theoretical one in formula (21). This is due to the factor in the exponent of , the number of the discretization points. The constant scaling factor is about , the implementation is economical. Note that due to the two-component Hamiltonian used in the solution (24) of the Schrödinger equation the actual number of qubits is .
Theoretical gate complexity for the approximation error using an oracle is calculated in [9] and is shown in 3 with a solid black line. In this reference authors show oracle implementation of the algorithm presented in [25, 3] with the gate complexity given by . Here the scaling factor is , which is better than ours ( in (27)) but with a constant factor of .
Therefore, when comparing our implementation with oracle based for Trotter order we obtain smaller gate count for number of qubits . The oracle based algorithm is also using qubits to implement oracles and thus is less economical than our approach.
VII Conclusion
We have presented an effective procedure for decomposition of a tridiagonal matrix where into subsets of commuting Pauli strings. Each of these subsets has Pauli strings of length in a general case. Significant for applications is the decomposition of a hermitian matrix consisting of two real tridiagonal matrices of the given type on the anti-diagonal. For such matrix there are internally commuting subsets with Pauli strings of length each as shown in corollary 3. The suggested decomposition procedure considers only non-zero Pauli strings candidates, therefore improving on the brute-force method which examines all possible Pauli strings. To our knowledge, this work on decomposition of specifically tridiagonal matrices is novel.
This advantage shows up in the calculation of the decomposition coefficients (weights, Section III.2), because only the potentially non-zero Pauli strings participate in the evaluation. For the hermitian matrix mentioned above there are binary multiplications in the evaluation of one expansion coefficient: we need to compute products of bit strings with length for each term (see (14)). This compares favorably with the brute force approach using trace and matrix multiplications with complexity . The Pauli matrices are sparse, which reduces the complexity of the brute force method to (e.g. [26]). Still, the presented decomposition procedure has exponentially fewer multiplications, which, to our knowledge, is also novel result.
An additional advantage of the presented decomposition is the automatic availability of the commuting subsets. Each of these subsets can be simultaneously diagonalized. This presents an opportunity for complexity reduction when evaluating the Hamiltonian.
For a practical demonstration of the proposed decomposition procedure we constructed a circuit for Hamiltonian simulation using an example of the one-dimensional wave equation (Section V). It is a case where a tridiagonal matrix naturally arises in the discretization of the differential equation, while the Hamiltonian is of the type considered above. There are have been numerous studies of this example in the literature, in particular there is an implementation using an oracle for the Hamiltonian evolution [9].
Our main result is captured in fig. 3 where we show that the computational complexity, specifically the number of gates needed to reach the accuracy of scales better than a theoretical estimate. It is also better than the oracle implementation [9] for small circuits with an additional advantage that the number of qubits needed to implement the Hamiltonian evolution with the presented method is by a factor of two smaller, than the oracle approach for any size matrix.
We believe that our method can be applied to the -, - and more-diagonal matrices which arise in the discretization of differential in and . Therefore, this will be a natural extension of our study.
We have formulated our results using Walsh operators which lift to a map on boolean strings. Similar results can be obtained by using Pauli strings directly. However, we believe, using this approach, the propositions on commuting sets and the other relevant results can be expressed algebraically in a concise and simple form.
Finally, we believe that the found commuting subsets are minimal, however a rigorous prove is deferred to future work.
VIII Acknowledgements
Competing interests. The authors declare no competing interests. Author contributions. All authors conceived and developed the theory and design of this study and verified the methods. The authors acknowledge the use of Skoltech’s Zhores supercomputer [28] for obtaining the numerical results presented in this paper.
References
- Feynman et al. [1982] R. P. Feynman et al., Int. J. Theor. phys 21 (1982).
- Lloyd [1996] S. Lloyd, Science 273, 1073 (1996).
- Berry et al. [2015a] D. W. Berry, A. M. Childs, and R. Kothari, 2015 IEEE 56th annual symposium on foundations of computer science , 792809 (2015a).
- Low and Chuang [2019] G. H. Low and I. L. Chuang, Quantum 3, 163 (2019).
- Childs et al. [2003] A. M. Childs, R. Cleve, E. Deotto, E. Farhi, S. Gutmann, and D. A. Spielman, Proceedings of the thirty-fifth annual ACM symposium on Theory of computing , 059068 (2003).
- Berry et al. [2015b] D. W. Berry, A. M. Childs, R. Cleve, R. Kothari, and R. D. Somma, Physical review letters 114, 090502 (2015b).
- Berry and Novo [2016] D. W. Berry and L. Novo, arXiv preprint arXiv:1606.03443 (2016).
- Low and Chuang [2017] G. H. Low and I. L. Chuang, Physical review letters 118, 010501 (2017).
- Suau et al. [2021] A. Suau, G. Staffelbach, and H. Calandra, ACM Transactions on Quantum Computing 2, 1 (2021).
- Trotter [1959] H. F. Trotter, Proceedings of the American Mathematical Society 10, 545 (1959).
- Childs et al. [2021] A. M. Childs, Y. Su, M. C. Tran, N. Wiebe, and S. Zhu, Physical Review X 11, 011020 (2021).
- Kawase and Fujii [2023] Y. Kawase and K. Fujii, Computer Physics Communications 288, 108720 (2023).
- Van Den Berg and Temme [2020] E. Van Den Berg and K. Temme, Quantum 4, 322 (2020).
- Mukhopadhyay et al. [2023] P. Mukhopadhyay, N. Wiebe, and H. T. Zhang, npj Quantum Information 9, 31 (2023).
- Lawrence et al. [2002] J. Lawrence, Č. Brukner, and A. Zeilinger, Physical Review A 65, 032320 (2002).
- Yen et al. [2023] T.-C. Yen, A. Ganeshram, and A. F. Izmaylov, npj Quantum Information 9, 14 (2023).
- Crawford et al. [2021] O. Crawford, B. van Straaten, D. Wang, T. Parks, E. Campbell, and S. Brierley, Quantum 5, 385 (2021).
- Pozrikidis [2014] C. Pozrikidis, Oxford University Press (2014).
- LeVeque [1998] R. J. LeVeque, Draft version for use in AMath 585, 112 (1998).
- Cerezo et al. [2021] M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cincio, et al., Nature Reviews Physics 3, 625 (2021).
- Peruzzo et al. [2014] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’brien, Nature communications 5, 4213 (2014).
- Welch et al. [2014] J. Welch, D. Greenbaum, S. Mostame, and A. Aspuru-Guzik, New Journal of Physics 16, 033040 (2014).
- Berry et al. [2007] D. W. Berry, G. Ahokas, R. Cleve, and B. C. Sanders, Communications in Mathematical Physics 270, 359 (2007).
- Tranter et al. [2019] A. Tranter, P. J. Love, F. Mintert, N. Wiebe, and P. V. Coveney, Entropy 21, 1218 (2019).
- Costa et al. [2019] P. C. S. Costa, S. Jordan, and A. Ostrander, Phys. Rev. A 99, 012323 (2019).
- Yuster and Zwick [2005] R. Yuster and U. Zwick, ACM Transactions On Algorithms (TALG) 1, 2 (2005).
- [27] “Github page with numerical experiments,” https://github.com/barseniev/tridiagonal-matrix-decomposition-quantum-simulation.
- Zacharov et al. [2019] I. Zacharov, R. Arslanov, M. Gunin, D. Stefonishin, A. Bykov, S. Pavlov, O. Panarin, A. Maliutin, S. Rykovanov, and M. Fedorov, Open Engineering 9 (2019), https://doi.org/10.1515/eng—2019—0059.
Appendix A Proofs
A.1 Formulae for decomposition coefficients
We call matrix an upper -diagonal matrix if it has the following form
(28) |
and can be written as
(29) |
Similarly, lower -diagonal matrix is introduced as transposed upper -diagonal matrix thus we will not consider this case separately and limit ourselves to upper -diagonal matrix. We also note that Pauli strings present in the decomposition of some matrix will be the same for because all Pauli matrices except are symmetric and , so after transposition Pauli strings in decomposition will be the same but coefficients may change a bit.
Proposition 4.
Let be an upper -diagonal matrix. If a Pauli string enters the Pauli string decomposition of matrix non-trivially then :
(30) |
where and is such that .
Proof.
Let , then decomposition into standard basis may be written as
(31) |
On the other hand, decomposition into Pauli basis in takes form
(32) |
where coefficients . These coefficients can be found by taking the inner product of matrix and and using formulae (4) and (5) from the main text.
(33) |
Since from (29) we have
(34) |
we can obtain by equating the coefficients for and :
(35) |
Substituting this expression into (33), we obtain final formula for the coefficients
(36) |
Hence for there should exist a solution to the following equation
(37) |
∎
A.2 Proof of proposition 1 for decomposition of general tridiagonal matrix
See 2
Proof.
(38) |
Thus we see that two Pauli strings and commute if .
∎
See 1
Proof.
We denote the number of operators in Pauli string as . Let correspond to
(39) |
Note that if and only if for some then
(40) |
Therefore, the number of all bit positions where corresponds to the number of in the Pauli string i.e.
(41) |
Since we have from our assumption, then from proposition 2 (here ) a commutation of and follows. Which means (12) holds and therefore and commute.
∎
See 1
Proof.
A Tridiagonal matrix decoposition comprises of terms for the diagonal (), upper -diagonal and lower -diagonal (that is transposed upper -diagonal). To obtain upper bounds on the number of Pauli strings in the decomposition of it suffices to check the number of pairs that satisfy the necessary conditions from proposition 4.
-
1.
For in (30) we get
(42) (43) Thus, for a Pauli string to satisfy the necessary conditions and can be arbitrary. Therefore, the maximum number of Pauli strings in the decomposition of diagonal matrix is bounded by .
-
2.
For in (30) using binary summation rules (recall that leftmost bit encodes lowest register) we get
(44) Since , we have
Now we can write (30) in the following form
(45) which means
(46) for and . It follows that for any if then are equal to . Therefore, can only be one of the following strings:
(47)
Therefore, the maximum number of Pauli strings in the decomposition of upper -diagonal matrix is bounded by .
In conclusion, adding the upper bounds for the diagonal, upper and lower -diagonal cases we obtain that the number of terms in the decomposition of is upper bounded by because Pauli strings for upper and lower -diagonal matrices will be the same as was mentioned before. Each of the above strings corresponds to a particular set in the decomposition of provided in the proposition. ∎
A.3 Proof of proposition 3 for decomposition of real tridiagonal matrix
See 3
Proof.
The condition that the matrix B is real can be expressed as:
(48) |
where means complex conjugation. From definitions (32) and (48) it follows:
(49) |
By comparing and one can obtain conditions on coefficients :
(50) |
Thus, has only the real part if or has only imaginary part if .
From Corollary 1, Pauli strings commute if the parity of the number of operators in each string is the same. Hence, we can partition the set of Pauli strings in terms of in proposition 1 into commuting subsets due to the fact that for every string , there are two sets of with equal cardinality that result in being zero or one modulo 2. However, for , any will not change . Consequently, we will end up with subsets, each with cardinality , and one subset with elements. ∎
See 2
Proof.
Let’s recall the decomposition of :
(51) |
Since , and for an arbitrary Pauli operator we can write
(52) |
Since matrix is symmetric
(53) |
Comparing and we obtain a condition for coefficients :
(54) |
which can be satisfied for non-trivial only when
(55) |
If , condition (55) automatically satisfied, for each of the remaining possible strings only half of the possible strings satisfy (55) and thus form subsets of size .
Also it follows from (55) that the number of operators must be even. Therefore the decomposition of real symmetric tridiagonal matrix consists only of subsets . Thus, we have subsets of size and one subset of size . ∎
See 3
Proof.
The Hermitian matrix is expressed in terms of matrix :
(56) |
Let us introduce the following matrices
(57) |
Then can be constructed as
(58) |
Since matrix is real valued then according to (50)
(59) |
Now in the equation (58) since either or , for the number of terms in the decomposition of is the same as that for . From (58) and the decomposition in proposition 1 it follows that
i.e the commuting subsets are constructed by appending or at the beginning of the Pauli strings in the decomposition to ensure the required parity. ∎