Limitations on the simulation of non-sparse Hamiltonians

Andrew M. Childs, Robin Kothari

Introduction

One of the primary applications of quantum computers is the simulation of quantum systems. Indeed, it was the apparent exponential time complexity of simulating quantum systems on a classical computer that led Feynman to propose the idea of quantum computation [Fey82].

In addition to predicting the behavior of physical systems, Hamiltonian simulation has algorithmic applications. For example, the implementation of a continuous-time quantum walk algorithm is a Hamiltonian simulation problem. Examples of algorithms that can be implemented using Hamiltonian simulation methods include unstructured search [FG96], adiabatic optimization [FGGS00], a quantum walk with exponential speedup over classical computation [CCDFGS03], and the recent NAND tree evaluation algorithm [FGG07].

where dd is the maximum number of nonzero entries in any row and ϵ\epsilon is the maximum error permitted in the final state (quantified in terms of trace distance).

The dependence of (1) on the simulation time is nearly optimal, since it is not possible to simulate a general sparse Hamiltonian for time tt using o(t)o(t) queries. Intuitively, there is no generic way to fast-forward through the time evolution of quantum systems. More formally,

For any positive integer NN there exists a row-computable sparse Hamiltonian HH with ∥H∥=1\|{H}\|=1 such that simulating the evolution of HH for time t=πN/2t=\pi N/2 within precision 1/41/4 requires at least N/4N/4 queries to HH.

More recently, methods have been presented for simulating a Hamiltonian HH that is not necessarily sparse. Of course, we do not expect to efficiently simulate a general Hamiltonian, simply because there are too many Hamiltonians to consider (just as we cannot hope to efficiently implement a general unitary operation [Kni95]). However, we can conceivably efficiently simulate non-sparse Hamiltonians with a suitable concise description. In particular, by applying phase estimation to a discrete-time quantum walk derived from HH, one can simulate HH for time tt in a number of walk steps that grows only linearly with tt [Chi08]. More precisely, we have

Measures of simulation complexity

These properties are reminiscent of the axioms for matrix norms, suggesting that it may be reasonable to quantify the complexity of simulating HH in terms of some matrix norm ν(H)\nu(H). Indeed, results on the simulation of sparse Hamiltonians are typically stated in terms of the spectral norm ∥H∥\|{H}\|, and Theorem 2 also involves matrix norms. We now introduce various matrix norms relevant to Hamiltonian simulation.

The spectral norm of a matrix HH is defined as

where ∥v∥\|{v}\| is the standard Euclidean vector norm defined as \|{v}\|\mathrel{\mathchoice{\vbox{\hbox{\displaystyle:}}}{\vbox{\hbox{\textstyle:}}}{\vbox{\hbox{\scriptstyle:}}}{\vbox{\hbox{\scriptscriptstyle:}}}{=}}\sqrt{\sum_{i}|v_{i}|^{2}}.

The induced 1-norm of a matrix HH is defined as

where ∥v∥1\|{v}\|_{1} is the vector 1-norm defined as \|{v}\|_{1}\mathrel{\mathchoice{\vbox{\hbox{\displaystyle:}}}{\vbox{\hbox{\textstyle:}}}{\vbox{\hbox{\scriptstyle:}}}{\vbox{\hbox{\scriptscriptstyle:}}}{=}}{\sum_{i}|v_{i}|}.

The maximum column norm of a matrix HH is defined as

The maximum column norm is the maximum Euclidean norm of the columns of HH. This norm appears in the complexity of an algorithm for simulating Hamiltonians whose graphs are trees [Chi08, Theorem 4] and in the related Proposition 2 in Section 5.

The max norm of a matrix HH is defined as

The max norm is just the largest entry of HH in absolute value. It is a matrix norm, and is typically much smaller than the other norms mentioned.

The following lemma relates the various norms introduced above.

Furthermore, each of these inequalities is the best possible.

The first inequality follows from the fact that the maximum element in any column cannot be greater than the Euclidean norm of that column. We have

Using the triangle inequality with ∥H∥=max⁡∥v∥=1(∑i∣∑jHijvj∣2)12\|{H}\|=\max_{\|{v}\|=1}(\sum_{i}|\sum_{j}H_{ij}v_{j}|^{2})^{\frac{1}{2}}, we get

Now by maximizing over all vv with ∥v∥=1\|{v}\|=1 instead of only those with vj≥0v_{j}\geq 0, we get

The last inequality is actually an equality due to the Perron–Frobenius theorem.

For the next inequality, we use the fact that ∥v∥1≤N∥v∥\|{v}\|_{1}\leq\sqrt{N}\|{v}\| for all vectors vv. This can be proved using the Cauchy–Schwarz inequality, ∣⟨u,v⟩∣≤∥u∥∥v∥|\langle u,v\rangle|\leq\|{u}\|\|{v}\|, by taking ui=vi/∣vi∣u_{i}=v_{i}/|v_{i}|. Let jmax⁡j_{\max} be the index jj that maximizes ∑i∣Hij∣\sum_{i}|H_{ij}|. Thus ∥H∥1=∑i∣Hijmax⁡∣=∥Hejmax⁡∥1\|{H}\|_{1}=\sum_{i}|H_{ij_{\max}}|=\|{He_{j_{\max}}}\|_{1}. Using these two inequalities, it follows that

The last inequality is proved using the fact that for any jj, Hij≤max⁡iHijH_{ij}\leq\max_{i}H_{ij}; thus

In Section 5, we discuss some more examples in which Lemma 1 can be strengthened, with emphasis on the implications for simulations.

A no–fast-forwarding theorem for dense Hamiltonians

The no–fast-forwarding theorem (Theorem 1 above) establishes a lower bound for the simulation of sparse Hamiltonians. Although we stated the theorem with ∥H∥=1\|{H}\|=1, any of the norms in Lemma 1 could have been used, since the Hamiltonian used in the proof of the no–fast-forwarding theorem is 22-sparse, and by (15) the norms differ at most by a factor of 22. In particular, the theorem could be restated with max⁡(H)≤1\max(H)\leq 1 or ∥H∥1≤2\|{H}\|_{1}\leq 2.

In terms of this black-box model, we have the following:

The main idea, as in the proof of Theorem 1 [BACS05], is to construct a Hamiltonian whose simulation for time t=πN/2t=\pi N/2 determines the parity of NN bits. Since we know that computing the parity of NN bits requires at least N/2N/2 queries [BBCMW01, FGGS98], this Hamiltonian cannot be simulated with o(N)o(N) queries. Moreover, we want this Hamiltonian to be non-sparse.

We start with a simple Hamiltonian H1H_{1} whose graph is just a line with N+1N+1 vertices. Consider the Hamiltonian acting on vectors ∣i⟩|i\rangle with i∈{0,…,N}i\in\{0,\ldots,N\}. The nonzero matrix entries of H1H_{1} are ⟨i∣H1∣i+1⟩=⟨i+1∣H1∣i⟩=(N−i)(i+1)/N\langle i\left|H_{1}\right|i+1\rangle=\langle i+1\left|H_{1}\right|i\rangle=\sqrt{(N-i)(i+1)}/N for i∈{0,1,…,N−1}i\in\{0,1,\ldots,N-1\}. This Hamiltonian has ∥H1∥=1\|{H_{1}}\|=1, and simulating H1H_{1} for t=πN/2t=\pi N/2 starting with the state ∣0⟩|0\rangle gives the state ∣N⟩|N\rangle (i.e., e−iH1t∣0⟩=∣N⟩e^{-iH_{1}t}|0\rangle=|N\rangle).

Now, as in Ref. [BACS05], consider a Hamiltonian H2H_{2} generated from an NN-bit string S0S1…SN−1S_{0}S_{1}\ldots S_{N-1}. HH acts on vertices ∣i,j⟩|i,j\rangle, with i∈{0,…,N}i\in\{0,\ldots,N\} and j∈{0,1}j\in\{0,1\}. The nonzero matrix entries of this Hamiltonian are

for all ii and jj. By construction, ∣0,0⟩|0,0\rangle is connected to either ∣i,0⟩|i,0\rangle or ∣i,1⟩|i,1\rangle for any ii; it is connected to ∣i,j⟩|i,j\rangle if and only if j=S0⊕S1⊕…⊕Si−1j=S_{0}\oplus S_{1}\oplus\ldots\oplus S_{i-1}. Thus ∣0,0⟩|0,0\rangle is connected to either ∣N,0⟩|N,0\rangle or ∣N,1⟩|N,1\rangle, and determining which is the case determines the parity of SS. The graph of this Hamiltonian consists of two disjoint lines, one of which contains ∣0,0⟩|0,0\rangle and either ∣N,0⟩|N,0\rangle or ∣N,1⟩|N,1\rangle depending on the parity of SS. Just as for H1H_{1}, starting with the state ∣0,0⟩|0,0\rangle and simulating H2H_{2} for time t=πN/2t=\pi N/2 will give either ∣N,0⟩|N,0\rangle or ∣N,1⟩|N,1\rangle, which determines the parity of SS. Note that since H2H_{2} is a permutation of H1⊕H1H_{1}\oplus H_{1}, ∥H2∥=∥H1∥=1\|{H_{2}}\|=\|{H_{1}}\|=1.

Finally, we construct the dense Hamiltonian HH that has the properties stated in the theorem. As before, HH is generated from an NN-bit string S0S1…SN−1S_{0}S_{1}\ldots S_{N-1}. HH acts on vertices ∣i,j,k⟩|i,j,k\rangle, with i∈{0,…,N}i\in\{0,\ldots,N\}, j∈{0,1}j\in\{0,1\}, and k∈{0,N−1}k\in\{0,N-1\}. The nonzero entries of HH are given by

for all ii, jj, kk, and k′k^{\prime}. The graph of HH is similar to that of H2H_{2}, except that for each vertex in H2H_{2}, there are now NN copies of it in HH. This Hamiltonian is dense because it has Θ(N2)\Theta(N^{2}) vertices and each vertex is connected to all NN copies of its neighboring vertices, which gives at least NN nonzero entries in each row.

Now, just as before, the parity of SS can be determined by simulating HH for time t=πN/2t=\pi N/2. This gives the lower bound of N/2N/2 queries.

A stronger limitation for dense Hamiltonians

The currently known dense Hamiltonian simulation algorithms rely on certain properties of the Hamiltonian that we call its structural properties. By this we mean the location of nonzero entries in HH, which correspond to the location of edges in the graph of the Hamiltonian, and the magnitudes of the edge weights. (The remaining information about the Hamiltonian is the phase of each matrix entry HijH_{ij}.)

To show the lower bound, we need a black-box problem with an Ω(N/log⁡N)\Omega(\sqrt{N/\log N}) average-case lower bound, and a set of Hamiltonians whose simulation would solve this problem. We consider the problem of distinguishing strings s∈{−1,+1}Ms\in\{-1,+1\}^{M} that have sum −B-B or +B+B, given a black box for the entries of the string. When queried with an index i∈{1,2,…,M}i\in\{1,2,\ldots,M\}, the black box returns the value of si∈{−1,+1}s_{i}\in\{-1,+1\}, where s=s1s2…sMs=s_{1}s_{2}\ldots s_{M}. The following lemma characterizes the query complexity of this problem.

Suppose we are given black-box access to a string s∈{−1,+1}Ms\in\{-1,+1\}^{M}, where ss is chosen uniformly at random from the set of strings with ∑isi∈{−B,+B}\sum_{i}s_{i}\in\{-B,+B\}. Then determining ∑isi\sum_{i}s_{i} has average-case quantum query complexity Θ(M/B)\Theta(M/B).

Thus, determining whether the sum is −Mlog⁡M-\sqrt{M\log M} or +Mlog⁡M+\sqrt{M\log M}, with the promise that one of these is the case, requires Ω(M/log⁡M)\Omega(\sqrt{M/\log M}) quantum queries on average. For each string ss, we construct a Hamiltonian HsH_{s} whose simulation for a particular time allows us to distinguish the two possible cases assuming ss satisfies the promise.

Let HsH_{s} be a symmetric circulant matrix of size N×NN\times N, where N=2M+1N=2M+1 is odd. (A circulant matrix is a matrix in which each row is rotated one element to the right relative to the preceding row.) In general, a circulant matrix is completely specified by its first row. However, since HsH_{s} is a symmetric circulant matrix, it is completely specified by the first M+1M+1 entries of the first row. Let the first entry of the first row be 0, and the next MM entries of the first row be s1,s2,…,sMs_{1},s_{2},\ldots,s_{M}. In other words, the first M+1M+1 entries of the first row of HsH_{s} are followed by the string ss. Then the remaining entries of the first row are sM,sM−1,…,s1s_{M},s_{M-1},\ldots,s_{1}.

Given a black box for the entries of ss, we can easily construct a black box for the entries of HsH_{s}. Indeed, one query to HH can be simulated with at most one query to the string ss. Sometimes no query to ss is needed, since the diagonal entries of HsH_{s} are always 0.

Since HsH_{s} is a circulant matrix, it is diagonalized by the discrete Fourier transform. Its eigenvalues λ0,λ1,…,λN−1\lambda_{0},\lambda_{1},\ldots,\lambda_{N-1} are

Thus the time evolution of HsH_{s} can be used to learn whether ∑jsj\sum_{j}s_{j} is −Mlog⁡M-\sqrt{M\log M} or +Mlog⁡M+\sqrt{M\log M}. Since λ0=2∑jsj\lambda_{0}=2\sum_{j}s_{j}, the two cases can be distinguished by determining the sign of λ0\lambda_{0}. Note that we know the eigenvector corresponding to λ0\lambda_{0}: it is the first column of the discrete Fourier transform matrix, i.e., the uniform superposition over all computational basis states.

Using Lemmas 3 and 4, we can upper bound the probability that ∥Hs∥\|{H_{s}}\| is large when ss is chosen uniformly at random from P\mathcal{P}. If XX is the event that ∥Hs∥≥4dMlog⁡M\|{H_{s}}\|\geq 4d\sqrt{M\log M} and YY is the event that s∈Ps\in\mathcal{P}, then Pr⁡(X)\Pr(X) is given by Lemma 3 and Pr⁡(Y)\Pr(Y) is given by Lemma 4. In these terms, we can compute an upper bound for Pr⁡(X∣Y)\Pr(X|Y) as follows:

Thus the average-case query complexity of the claimed algorithm is O((log⁡M)c)O\left((\log M)^{c}\right), which violates the lower bound of Ω(M/log⁡M)\Omega(\sqrt{M/\log M}). ∎

The proof technique above can be extended to rule out algorithms with query complexity sub-exponential in (∥Ht∥,log⁡N)(\|{Ht}\|,\log N) as well, by changing the promised set (i.e., the value of BB used in Lemma 2) and choosing a larger value of dd in Lemma 3. Exponential functions of (∥Ht∥,log⁡N)(\|{Ht}\|,\log N) cannot be ruled out, of course, since any Hamiltonian can be simulated by making O(N2)O(N^{2}) queries, which is exponential in log⁡N\log N. On the other hand, if we insist that the query complexity of an algorithm depends only on ∥Ht∥\|{Ht}\| (and not log⁡N\log N), then the proof above can be modified to rule out algorithms whose time complexity is an arbitrary function of ∥Ht∥\|{Ht}\|. For example, there exists no Hamiltonian simulation algorithm that makes exp⁡(exp⁡(∥Ht∥))\exp(\exp(\|{Ht}\|)) queries.

Finally, we emphasize that even though the above proof involves average-case complexity and distributions over inputs, Theorem 4 is a statement about the worst-case complexity of simulating Hamiltonians.

Simulation complexity for structured Hamiltonians

The matrix UU is diagonal. To define UiiU_{ii}, we arbitrarily fix some vertex as the root and consider the unique path from the root to vertex ii. Let the path contain the vertices i0,i1,…,ip−1,ip,ii_{0},i_{1},\ldots,i_{p-1},i_{p},i, where i0i_{0} is the root and ipi_{p} is the parent of ii. For each nonzero entry of HH, define \alpha_{ij}\mathrel{\mathchoice{\vbox{\hbox{\displaystyle:}}}{\vbox{\hbox{\textstyle:}}}{\vbox{\hbox{\scriptstyle:}}}{\vbox{\hbox{\scriptscriptstyle:}}}{=}}H_{ij}/|H_{ij}|. Then let U_{ii}\mathrel{\mathchoice{\vbox{\hbox{\displaystyle:}}}{\vbox{\hbox{\textstyle:}}}{\vbox{\hbox{\scriptstyle:}}}{\vbox{\hbox{\scriptscriptstyle:}}}{=}}1 if ii is the root and U_{ii}\mathrel{\mathchoice{\vbox{\hbox{\displaystyle:}}}{\vbox{\hbox{\textstyle:}}}{\vbox{\hbox{\scriptstyle:}}}{\vbox{\hbox{\scriptscriptstyle:}}}{=}}\alpha_{i_{0}i_{1}}\alpha_{i_{1}i_{2}}\cdots\alpha_{i_{p-1}i_{p}}\alpha_{i_{p}i} otherwise.

Since UU is diagonal, (UHU†)ij=UiiHijUjj∗(UHU^{\dagger})_{ij}=U_{ii}H_{ij}U_{jj}^{*}. If ii and jj are not adjacent in the tree, then (UHU†)ij=Hij=0(UHU^{\dagger})_{ij}=H_{ij}=0 as required. Otherwise, suppose without loss of generality that jj is the parent of ii. Then UiiUjj∗=∣αi0i1∣2∣αi1i2∣2⋯∣αip−1ip∣2αji=Hji/∣Hij∣U_{ii}U_{jj}^{*}=|\alpha_{i_{0}i_{1}}|^{2}|\alpha_{i_{1}i_{2}}|^{2}\cdots|\alpha_{i_{p-1}i_{p}}|^{2}\alpha_{ji}=H_{ji}/|H_{ij}|, so (UHU†)ij=∣Hij∣(UHU^{\dagger})_{ij}=|H_{ij}| as claimed. ∎

If HH can be expressed as the sum of a small number of Hamiltonians, each of whose graph is a forest, then HH can be efficiently simulated when ∥H∥\|{H}\| is small. Recall that a graph is said to have arboricity kk if its adjacency matrix can be written as the sum of the adjacency matrices of kk forests, but not k−1k-1 forests.

We begin by considering the case of a star graph. A star graph is a tree on nn vertices with one vertex having degree n−1n-1 and the others having degree 11 (i.e., the complete bipartite graph K1,n−1K_{1,n-1}). We show that if SS is a Hamiltonian whose graph is a star,

To show the result for graphs of arboricity kk, we begin by showing how a rooted tree can be decomposed into the sum of two forests of stars. The first forest contains all the edges in which the parent vertex is at a even distance from the root. The second forest contains the rest of the edges. This decomposes a rooted tree into two forests of stars, and similarly decomposes a forest into two forests of stars. Since the Hamiltonian has arboricity kk, it can be decomposed into kk forests, which can be decomposed into 2k2k forests of stars.

Open questions

Acknowledgments

We thank Aram Harrow for suggesting the use of Hoeffding’s inequality to simply the proof of Lemma 3. This work was supported by MITACS, NSERC, QuantumWorks, and the US ARO/DTO.

Appendix: Proofs of lemmas

In this appendix, we prove Lemmas 2, 3, and 4.

We show the lower bound by first showing the same lower bound for the worst-case problem using the quantum adversary method [Amb02] and then reducing the worst-case problem to the average-case problem.

For the worst-case lower bound, we use the notation of Theorem 2 of Ref. [Amb02]. We require two sets of inputs XX and YY that have different outputs. Let XX be the set of all strings for which ∑isi=−B\sum_{i}s_{i}=-B, and YY be the set for which ∑isi=+B\sum_{i}s_{i}=+B. We define a relation between the sets as follows. Let an element x∈Xx\in X be related to an element of y∈Yy\in Y if and only if yy can be reached from xx by changing exactly B/2B/2 −1-1s to +1+1s in the string xx. Note that a string in XX has exactly (M/2+B/2)(M/2+B/2) −1-1s and (M/2−B/2)(M/2-B/2) +1+1s.

Using these sets XX and YY, and the relation defined above, it is easy to see that

The adversary method now provides a lower bound of Ω(mm′/ll′)=Ω(M/B)\Omega\left(\sqrt{{mm^{\prime}}/{ll^{\prime}}}\right)=\Omega(M/B) for the worst-case query complexity of this problem.

The worst-case query complexity can now be reduced to the average-case query complexity under the uniform distribution over all input strings satisfying the promise. To do this, we first apply a uniformly random permutation to the input string, and then with probability 12\frac{1}{2} multiply all the entries by −1-1 (and leave them unchanged with probability 12\frac{1}{2}). The resulting distribution is now uniform over all input strings satisfying the promise. If the string is not multiplied by −1-1, then the output of the permuted string is the same as the input string. If all the entries are multiplied by −1-1, then the output of the modified string is the opposite of that of the original input.

The lower bound is tight due to a matching upper bound provided by the algorithm for approximate quantum counting [BHMT02]. To distinguish the two types of inputs, we can approximately count the number of +1+1s to accuracy ϵ=B/2M\epsilon={B}/{2M}, which requires O(M/B)O(M/B) queries. ∎

The eigenvalues of HsH_{s} are λr=2∑j=1Msjcos⁡2πjrN\lambda_{r}=2\sum_{j=1}^{M}s_{j}\cos\frac{2\pi jr}{N}, where r∈{0,1,…,N−1}r\in\{0,1,\ldots,N-1\}. We wish to bound the probability that λr\lambda_{r} is large, so as to bound the probability of ∥Hs∥=max⁡r∣λr∣\|{H_{s}}\|=\max_{r}|\lambda_{r}| being large. This is achieved by applying Hoeffding’s inequality [Hoe63, Theorem 2].

If X1,X2,…,XMX_{1},X_{2},\ldots,X_{M} are independent and aj≤Xj≤bja_{j}\leq X_{j}\leq b_{j} for all 1≤j≤M1\leq j\leq M, then for any t>0t>0, we have

Since a similar inequality holds when XjX_{j} is replaced by −Xj-X_{j}, we get

Finally, since ∥Hs∥=max⁡r∣λr∣\|{H_{s}}\|=\max_{r}|\lambda_{r}|, a union bound gives

Of the 2M2^{M} strings of length MM, those with sum −Mlog⁡M-\sqrt{M\log M} or +Mlog⁡M+\sqrt{M\log M} have either 12(M+Mlog⁡M)\frac{1}{2}(M+\sqrt{M\log M}) +1+1s or 12(M+Mlog⁡M)\frac{1}{2}(M+\sqrt{M\log M}) −1-1s. Thus the total number of such strings is

We can asymptotically approximate this expression using a well-known approximation for the binomial coefficients (see for example equations 4.5 and 4.10 of Ref. [Odl95]), which states that

provided ∣k−n/2∣=o(n2/3)|k-n/2|=o(n^{2/3}). Applying this to (34), we get

References