Abstract 1 Introduction 2 Proof Overview 3 Preliminaries 4 Upper Bound References Appendix A Lower Bound Appendix B Optimal Tolerant Testing with Inverse Queries

Hamiltonian Locality Testing via Trotterized Postselection

John Kallaugher ORCID Sandia National Laboratories, Albuquerque, NM, USA Daniel Liang ORCID Portland State University, OR, USA
Abstract

The (tolerant) Hamiltonian locality testing problem, introduced in [Bluhm, Caro, Oufkir ‘24], is to determine whether a Hamiltonian H is ε1-close to being k-local (i.e. can be written as the sum of weight-k Pauli operators) or ε2-far from any k-local Hamiltonian, given access to its time evolution operator and using as little total evolution time as possible, with distance typically defined by the normalized Frobenius norm. We give the tightest known bounds for this problem, proving an O(ε2(ε2ε1)5) evolution time upper bound and an Ω(1/(ε2ε1)) lower bound. Our algorithm does not require reverse time evolution or controlled application of the time evolution operator, although our lower bound applies to algorithms using either tool.

Furthermore, we show that if we are allowed reverse time evolution, this lower bound is tight, giving a matching O(1/(ε2ε1)) evolution time algorithm.

Keywords and phrases:
quantum algorithms, property testing, hamiltonians
Funding:
Daniel Liang: Supported by US NSF Award CCF-222413.
Copyright and License:
[Uncaptioned image] © John Kallaugher and Daniel Liang; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Quantum complexity theory
Related Version:
Full Version: https://arxiv.org/abs/2505.06478
Acknowledgements:
We would like to thank Vishnu Iyer and Justin Yirka for getting us started on this problem. We would also like to thank Francisco Escudero Gutiérrez, Srinivasan Arunachalam, and Fang Song for insightful feedback and comments.
Funding:
Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525. This work was supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Accelerated Research in Quantum Computing, Fundamental Algorithmic Research for Quantum Utility, with support also acknowledged from Fundamental Algorithm Research for Quantum Computing. This work was performed, in part, at the Center for Integrated Nanotechnologies, an Office of Science User Facility operated for the U.S. Department of Energy (DOE) Office of Science. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International, Inc., for the U.S. DOE’s National Nuclear Security Administration under contract DE-NA-0003525. The views expressed in the article do not necessarily represent the views of the U.S. DOE or the United States Government.
Editor:
Bill Fefferman

1 Introduction

When dealing with large or expensive-to-measure objects, learning the entire object may be too costly. Property testing algorithms instead attempt to distinguish between the object having a given property, or being far from any object with the property. More generally, one can consider tolerant testing, where one attempts to distinguish between the object being within ε1-close to having a property, or being at least ε2-far from any object with the property. Such algorithms have been extensively studied in quantum and classical settings (see [18] for an overview of the quantum case), but [6] was the first to consider it for Hamiltonians accessed via their time evolution operator eiHt. In this setting the natural measure of cost is total evolution time, jtj where the jth application of the time evolution operator is eiHtj.111Another cost measure that can be considered is total query count, the number of individual applications of the time evolution operator. Our algorithm also uses the fewest number of queries of any known algorithm.

The property they considered was k-locality, a problem initially raised (but not studied) in [18, Section 7] as well [19]. A Hamiltonian H is k-local if and only if it can be written as jHj, where each Hj operates on only k qubits. Such locality constraints (perhaps even geometrically locality constraints) are considered to be physically relevant. Local Hamiltonians also appear to be theoretically relevant, as nearly all general learning algorithms for Hamiltonians assume that the Hamiltonian is local, whether they use the time evolution operator [15, 14, 5], or copies of the Gibbs state [2, 4]. Local Hamiltonians are also conducive to efficient simulation on quantum computers, using the technique of Trotterization to break up the Hamiltonian into local quantum gate operations [16]. Finally, local Hamiltonians play an important role in quantum complexity theory, such as QMA-completeness and the Quantum PCP conjecture [1].

The initial version of [6] gave an O(nk+1/(ε2)3) evolution time algorithm when distance is measured by the normalized (divided by 2n/2 for a Hamiltonian acting on n qubits) Frobenius norm, improved in [12] to O((ε2ε1)7) and then in a later version of [6] to O((ε2ε1)2.5ε20.5).222The original [6] algorithm only worked in the intolerant setting of ε1=0.333[12] was later subsumed by [3], which gives an O((ε2ε1)3) analysis. This left open the question: how hard is locality testing? Is it possible to achieve linear (a.k.a. Heisenberg) scaling in 1/ε for evolution time, and is such a scaling optimal in all error regimes? In this work we make progress towards resolving the complexity of this problem, improving the best known upper and lower bounds. Our algorithm is based on a technique we refer to as Trotterized post-selection, in which we suppress the effect of local terms in the Hamiltonian evolution by repeatedly evolving for a short time period and post-selecting on the non-local part of the time evolution operator.

1.1 Our Results

Our main result is a improved upper bound for the Hamiltonian locality testing problem. As with past works, our algorithm is also time-efficient and non-adaptive, though it does requires n qubits of quantum memory, like [12, 3].

Theorem 1.

Let 0ε1<ε21, δ(0,1), and k. There is an algorithm that distinguishes whether an n-qubit Hamiltonian H is (1) within ε1 of some k-local Hamiltonian or (2) ε2-far from all k-local Hamiltonians, with probability 1δ. The algorithm uses O(ε2(ε2ε1)7log(1/δ)) non-adaptive queries to the time evolution operator with O(ε2(ε2ε1)5log(1/δ)) total evolution time.

We pair it with the first lower bound in the tolerant testing setting. While our upper bound uses only forward time evolution and does not require controlled application of eitH, our lower bound also applies to algorithms using either of these tools.

Theorem 2.

Let 0ε1<ε21 and k. Then any algorithm that can distinguish whether an n-qubit Hamiltonian H is (1) within ε1 of some k-local Hamiltonian or (2) ε2-far from all k-local Hamiltonians, must use Ω(1ε2ε1) evolution time in expectation to achieve constant success probability.

 Remark 3.

[6, Theorem 3.6] gives a hardness result for the unnormalized Frobenius norm (as well as other Schatten norms) in the non-tolerant setting that scales as Ω(2n/2ε). Once normalized, this also gives a Ω(1ε) lower bound. However, this hardness result only holds for exponentially small ε, due to the fact that the “hard” Hamiltonian in [6, Lemma 3.2] no longer has H1 when the unnormalized Frobenius distance to k-local is super-constant. Therefore Theorem 2 is, to the authors’ knowledge, the first lower bound that works for arbitrary values of ε, in addition to being the first for the tolerant setting. Our proof is also considerably simpler, and still extends to all of the distance measures considered in [6] and more.

Finally, we show that, when reverse time evolution and controlled operations are allowed, it is possible to saturate this lower bound even in the tolerant case (proof in the appendix).

Theorem 4.

Let 0ε1<ε21, δ(0,1), and k. There is an algorithm that tests whether an n-qubit Hamiltonian H is (1) ε1-close to some k-local Hamiltonian or (2) ε2-far from all k-local Hamiltonians, with probability 1δ. The algorithm uses O(log(1/δ)(ε2ε1)2) non-adaptive queries to the time evolution operator and its inverse, with O(log(1/δ)ε2ε1) total evolution time.

2 Proof Overview

2.1 Upper Bound

For simplicity, we will consider the intolerant case (ε1=0, ε2=ε) for this proof overview; the same techniques apply in the tolerant case but require somewhat more care. First we start with the intuition behind the algorithm of [12, 3].

We will need the fact that the space of 2n qubit states 22n has the Bell basis (|σP)P, where P spans the n-fold Paulis, |σIn is the maximally entangled state 12nx{0,1}n|x|x, and |σP=(InP)|σIn. Therefore, for any unitary U, if we apply InU to |σIn and then measure in the Bell basis, we are able to sample from the (squared) Pauli spectrum444That is, αP2 when U is written as PαpP. of U (the squares of the Pauli decomposition coefficients always sum to 1 for a unitary [17]).

For any Hamiltonian H, the closest k-local Hamiltonian is given by dropping all of the non-local Paulis from its Pauli decomposition. Therefore, as by the first-order Taylor series expansion,

eiHtIniHt

for small enough t, we can set U=eiHt in the aforementioned procedure, and if H is ε-far from local we will sample a non-local Pauli term with (tε)2 probability. Conversely, if H is local we should sample no non-local terms, giving us a distinguishing algorithm if the process is repeated O((tε)2) times, for a total time evolution of O(t1ε2).

So ideally we would like t to be Θ(1/ε) and only repeat a constant number of times, leading to a total time evolution of O(ε1), which would be optimal by Theorem 2.

Unfortunately, these higher-order terms in the Taylor series cannot be ignored at larger values of t. As we have H1, we can bound the kth order term of the Taylor series expansion of H by O(tk), and so we must set t to be at most Θ(ε), resulting in the total time evolution of O(ε3) obtained in previous work [12, 3].

To evade this barrier, we will instead show that it is possible to (approximately) simulate evolving by H>k, which is composed of only the non-local terms of the Pauli decomposition of H. Note that if H is k-local, this is 0, while if it is not, H>k is the difference between H and the closest k-local Hamiltonian. Suppose we could evolve by the time evolution operator of this Hamiltonian. Then performing the Bell sampling procedure from before would return |σIn with probability

|σIn|(IneiH>kt)|σIn|2
=|σIn|(In(=0(H>k)(it)!))|σIn|2
=|1+σIn|(In(=2(H>k)(it)!))|σIn|2
=1σIn|(In(H>k)2)|σIn+=3O(t|σIn|(In(H>k))|σIn|)

as H contains no identity term.

To tame this infinite series, imagine that H>k1 (we will eventually evolve by a related operator A that does satisfy A1). Then we have

|σIn|(In(H>k))|σIn|σIn|(In(H>k)2)|σIn

for all integers 2, so as long as t is a sufficiently small constant, we have that |σIn|(IneiH>kt)|σIn|2 is at least

10.99σIn|(In(H>k)2)|σIn=10.99Tr((H>k)2)/2n,

where Tr((H>k)2)/2n=ε2 is exactly the squared normalized Frobenius distance of H from being k-local. So if we apply eiH>kt with t=Θ(1), we are left with a ε2 probability of sampling a non-local Pauli term if H is non-local, and are guaranteed to measure identity if H is local (as then eiH>kt is the identity). This means we can distinguish locality from non-locality with O(ε2) repetitions, requiring O(ε2) total evolution time.555Unfortunately, even with access to the time evolution operator of H>k we cannot set t to the optimal Θ(1/ε), as we lose control of the higher-order terms of the Taylor expansion.

Now, we cannot actually apply eiH>kt. However, when starting at |σIn, we can approximate it up to t=Θ(1) by the use of a process reminiscent of the Elitzur-Vaidman bomb-tester [9] and Quantum Zeno effect [10], which we refer to as Trotterized post-selection.

Let D be the subspace of Bell states corresponding to non-local Paulis or identity and let ΠD be the projector onto that subspace. Starting with |σIn once again, we apply IneiHt for t=O(ε), measure with {ΠD,I2nΠD}, and then post-select on the measurement result ΠD. We then repeat our application of IneiHt and post-selection, for O(1/t) iterations, provided our post-selection succeeds each time.

As we start with |σIn, then make small adjustments (i.e., eiHtI2n for small t), the chance of failing the post-selection is small: only O(ε2) at each iteration, and so as long as we only use O(1/ε) iterations, we will succeed with probability 1O(ε). Now, as we are taking small steps, we can approximate each iteration of ΠD(IneiHO(ε))ΠD as

ΠD(IneiHO(ε))ΠD=ΠD(In=0H(i)O(ε)!)ΠD=eiAO(ε)+R

where we define AΠD(InH)ΠD and choose some RO(ε2).666Note that the ΠD on the right does nothing besides make A obviously Hermitian, assuming our invariant of our post-selection succeeding.

Now, in general, AInH>k, but as long as H has no identity term in its Pauli decomposition777We can assume this without loss of generality, as our algorithm never uses controlled application of eiHt, and so any identity term would manifest as an undetectable global phase., by construction A|σIn=(InH>k)|σIn, and so σIn|A2|σIn=σIn|I(H>k)2|σIn. Combined with the fact that A=ΠD(InH)ΠDH1, we can argue that, if we iterate t/t times

σIn|i=1t/teiAt|σIn =σIn|eiAt|σIn
=σIn|(=0A(it)!)|σIn
=1t2σIn|H>k2|σIn+O(t3ε2)

where the final inequality follows from the fact that for all k>2,

|σIn|Ak|σIn|Ak2σIn|A2|σInσIn|(In(H>k)2)|σIn=ε2.

So as our method based on access to the time evolution operator of H>k only required distinguishing between σIn|H>k|σIn being Θ(ε2) and 0 we can emulate it with access to eiAt without losing too much accuracy, as long as we take t to be a small enough constant. We can therefore test locality with a total time evolution of O(ε2).

2.2 Lower Bound

To prove the lower bound, it suffices to show that for any k there exists Hamiltonians H1 and H2 such that a query to the time t evolution of H1 and H2 differ in diamond distance by at most O((ε2ε1)t), with H1 ε1-close to being k-local and H2 ε2-far from being k-local.

We achieve this by considering the weight-k Pauli Z1:k that is Z on the first k qubits, and identity on the last nk qubits. We then set H1ε1Z1:k and H2ε2Z1:k. Because Z1:k is diagonal, so is eiεZ1:kt, making it straightforward to bound the diamond distance of the two time evolution operators by O(t(ε2ε1)). By the sub-additivity of diamond distance, the total time evolution required to distinguish the two Hamiltonians with constant probability is therefore at least Ω((ε2ε1)1).

3 Preliminaries

3.1 Quantum Information

A Hamiltonian on n-qubits is a 2n×2n Hermitian matrix. The time evolution operator of a Hamiltonian H for time t0 is the unitary matrix

eiHtk=0Hk(i)ktkk!.

We define the n-qubit Pauli matrices to be 𝒫n{I,X,Y,Z}n, where X=(0110), Y=(0ii0), Z=(1001). For any Pauli P, we denote the locality |P| to be the number of non-identity terms in the tensor product. Let the Frobenius inner product between matrices A and B be A,BTr(AB). The orthogonality of Pauli matrices under the Frobenius inner product is implied by the fact that any product of Paulis is another Pauli (up to sign) and the fact that among them only the identity has non-zero trace. Given a matrix A=P𝒫nαPP, the locality of A is the largest |P| such that αP0. If A is a Hamiltonian (i.e., Hermitian) then all αP are real-valued. The normalized Frobenius norm is given by

A2=A,A2n=Tr(AA)2n=P𝒫n|αP|2,

and will be used as our distance to k-locality, in keeping with the previous literature [6, 12, 3]. The other important norm will be the (unnormalized) spectral norm A, which is the largest singular value of A. For any matrix A, A2A, recalling that 2 is the normalized Frobenius norm. As a form of normalization and to be consistent with the literature, we will assume that H1 for any Hamiltonian referenced. We will also WLOG assume that Tr(H)=0 for any Hamiltonian, since it does not affect the time evolution unitary beyond a global phase, and so as our algorithms do not use controlled application of the unitary, they cannot be affected by it.

We define A>k|P|>kαPP and subsequently Ak|P|kαPP. By the orthogonality of the Pauli matrices under the Frobenius inner product, Ak is the k-local Hamiltonian that is closest to A with distance AAk2=A>k2.

Let B={|Φ+,|Φ,|Ψ+,|Ψ} denote the set containing the four Bell states. We will view Bn as a basis of 2n2n, in which for each copy of B, one qubit is assigned to the left register and one to the right. Note that, up to phase, every state in Bn is equal to (InP)|Φ+n for a unique P𝒫n. We will write |σP for this basis element. As an example,

|Φ+n=|σIn=12nx{0,1}n|x|x.

If U=P𝒫nαPP is a unitary matrix, then by Parseval’s identity, P𝒫n|αP|2=1, i.e. |αP|2 gives a probability distribution over the Paulis. Applying InU to the state |σIn=|Φ+n and measuring in the Bell basis Bn allows one to sample from this distribution [17].

For a quantum channel that takes as input an n-qubit state, we will let the diamond norm refer to Λmaxρ(InΛ)(ρ)1 where the maximization is over all 2n-qubit states ρ. The diamond distance famously characterizes the maximum statistical distinguishability (i.e., induced trace distance) between quantum channels [21, Section 9.1.6], even with ancillas.

3.2 Probability

Fact 5 (Multiplicative Chernoff Bound).

Suppose X1,,Xm are independent Bernoulli random variables. Let X denote their sum and let μ𝔼[X]. Then for any t>0

Pr[X(1t)μ]et2μ/2.

We will not need a particularly tight form of this bound, so for ease of analysis we state the following (loose) corollary.

Corollary 6.

Suppose X1,,Xm are i.i.d. Bernoulli random variables with probability p, and

m=2p(d+log(1/δ)).

Then

Pr[i=1mXi<d]δ.

Proof.

Let μ𝔼[i=1mXi]=mp and let γ1dμ. By the (Multiplicative Chernoff Bound).,

Pr[i=1mXi<d] =Pr[i=1mXi<(1γ)μ]
exp(μ2γ2)=exp(μ2d22μ+d)exp(mp2+d).

Hence, as long as

m2log(1/δ)+2dp,

then i=1mXid with probability at most δ.

Fact 7 (Bernstein’s inequality).

Suppose X1,,Xn are independent Bernoulli random variables. Let X denote their sum and let μ and σ2 be the expectation and variance of X respectively. Then for t(0,n)

Pr[Xμt]et22σ2+t3 and Pr[Xμt]et22σ2+t3.

4 Upper Bound

We will frequently use the truncation of the Taylor series of the matrix exponential to analyze our algorithm. The following will allow us to then bound the error of the truncation.

Fact 8 ([8, Lemma F.2]).

If λ then |k=λkk!||λ|!e|λ|.

Corollary 9.

For n-qubit Hamiltonian H with H1, the first order Taylor series expansion of the matrix exponential gives

eiHt=IniHt+ett22R

for R1.

Proof.

By the triangle inequality and the fact that HkH1 for k1:

eiHt(IniHt)=k=2(i)kHktkk!k=2Hktkk!k=2tkk!ett22,

using Fact 8 at the end. Setting R2ett2(eiHt(IniHt)) completes the proof.

We also prove the related fact to bound the real and imaginary terms.

Fact 10.

If λ then

|k=λ2k(2k)!||λ|2(2)!cosh(|λ|)

and

|k=λ2k+1(2k+1)!||λ|2+1(2+1)!cosh(|λ|).

Proof.

|k=λ2k(2k)!|k=|λ2k|(2k)!=|λ|2k=0|λ|2k(2k+2)!|λ|2(2)!k=0|λ|2k(2k)!=|λ|2(2)!cosh(|λ|)

and

|k=λ2k+1(2k+1)!| k=|λ2k+1|(2k+1)!=|λ|2+1k=0|λ|2k(2k+2+1)!
|λ|2+1(2+1)!k=0|λ|2k(2k)!=|λ|2+1(2+1)!cosh(|λ|).

4.1 Algorithm

Definition 11.

We will use D to denote the subspace of 2n2n spanned by |σP for Pauli strings P that are either the identity or are not k-local, and ΠD to denote the projector onto D. We define AΠD(InH)ΠD.

We start by giving an algorithm that returns a Bernoulli random variable X{0,1}, where 𝔼[X] approximates the distance of H from being k-local. It does so by iteratively applying eiαH sandwiched by {ΠD,I2nΠD} measurements.

Algorithm 1 Hamiltonian Locality Estimator via Trotterized Postselection.

Let αε22ε12100ε2 be the step-size used in line 3, tε22ε122ε2 be the total time evolution used in Algorithm 1, and let mt/α=50ε22ε12 be the number of iterations used in line 2. In our analysis will frequently use the fact that αε21001100 and t0.5 to simplify higher-order terms.

 Remark 12.

While we attempted to keep the constants in the algorithm reasonable, no attempt was made to optimize them. We observe that t should remain Θ(ε22ε12ε2) for optimal scaling, but α can be made arbitrarily small to (marginally) improve the constants in the total time evolution used. This has a cost in the total number of queries used, scaling roughly proportional to α1.

First we show that the final state of the Trotterized postselection algorithm corresponds to evolving |σIn by eiAt, with a bounded error term. There are two main sources of error: (1) the error from higher-order terms in the respective Taylor series of eiAα and ΠD(IneiHα)ΠD not matching and (2) the error from post-selection causing normalization issues. The following technical lemma allows us to tackle the error from (1). This is done by showing that eitA=ΠD(IneitH)ΠD±O(α2) for sufficiently small α. By chaining these together, the triangle inequality will eventually show in Lemma 14 that the accumulated error is then at most O(α2m)=O(αt).

Lemma 13.

Let H=P𝒫nαPP be any Hamiltonian with H1. Then,

ΠD(IneiαH)ΠD=eiαA+η

where ηeαα2.

Proof.

By Taylor expanding the complex exponential of eiαH and applying Corollary 9, we get

ΠD(IneiαH)ΠD =ΠD(In(IniαH+eαα22R))ΠD
=I2niαA+etα22R

where RInR=R1.

Next, we observe that AInH=H1 and that A is Hermitian by symmetry. We can then Taylor expand eiαA to get

eiαA=I2niαA+eαα22Q

where Q1. By the triangle inequality, the difference

ηΠD(IneiαH)ΠDeiαA

between these two linear transformations satisfies

ηReαα22+Qeαα22eαα2.

Luckily, the error from (2) is mostly a non-issue, using a process similar to the Elitzur-Vaidman bomb [9]: by taking small steps between applications of ΠD, we ensure that we are barely changing our system, and so the post-selection nearly always succeeds. This also means that the normalization error can be suppressed to be arbitrarily small, at the cost of linearly increasing the number of times we have to query the time evolution operator. Using these facts together, we show that Algorithm 1 approximately applies the time evolution operator of A.

Lemma 14.

Algorithm 1 terminates before the final measurement with probability at most 9998αt. If it does not, |ϕ=eiAt|σIn+|Δ just before the final measurement, with |Δ274αt.

Proof.

Note that the algorithm can only be terminated early if, in one of the loop iterations, the measurement in line 4 returns I2nΠD. At the start of the iteration |ϕ=|σInD. Since |ϕ remains within D after each successful iteration, by Taylor expanding the exponential, and applying Corollary 9 to obtain a suitable R with R1, the probability of failure at each iteration is at most

(I2nΠD)(IneiHα)ΠD|ϕ22
=(I2nΠD)(In(IniαH+α22eαR))|ϕ22
=(I2nΠD)(iα(InH)+α22eα(InR))|ϕ22
(αH+α2eα2R)2
(1+αeα+α24e2α)α2
<9998α2

where the third line follows from |ϕD, the fourth from the triangle inequality combined with the definition of the spectral norm, and the final line from α0.01. By a union bound over the m iterations, the first part of the lemma follows, noting that tαm.

For the second part pertaining to accuracy, first we note that in each iteration, if the measurement in line 4 does not make the algorithm terminate, the iteration had the effect of taking |ϕD to

ΠD(IneiαH)|ϕ=ΠD(IneiαH)ΠD|ϕ,

normalized to length 1. After the m iterations of the loop of Algorithm 1, |ϕ is then

i=1mΠD(IneiαH)ΠD|σIn

normalized to length 1. By Lemma 13, before normalization this is equivalent to

i=1m(eiαA+η)|σIn=(k=0m(mk)eiαA(mk)ηk)|σIn

for ηα2eα. The distance of the un-normalized vector from eiAt|σIn is then

eiAt|σIni=1m(eiAt+η)|σIn2=(k=1m(mk)eiαA(mk)ηk)|σIn2
k=1mmkηkk=1m(mα2eα)kk=1(mα2eα)k=mα2eα11mα2eα=αteα11αteα.

Finally, to bound the error introduced by normalization, for each r[m], write |ϕri=1rΠD(IneiαH)ΠD|σIn for the projected state at iteration r. We note that, by the same argument proving that the probability of the measurement at any given step returning the I2nΠD result is at most 9998α2, |ϕr is separated from eiAt|ϕr1 by an orthogonal vector of length at most 9998αeiAt|ϕr12=9998α|ϕr12. Therefore,

|ϕr2|ϕr1219998α2|ϕr120.69998α2

where the last inequality follows from the fact that 11x0.6x for x[0,59] and 9998α2<59. The total additional error from the normalization is then at most 297490α2m=297490αt. By the triangle inequality, the total distance from eiAt|σIn is at most

297490αt+tαeα11αteα74αt.

We now show that (approximately) applying eiAt instead of IneiHt allows us to suppress the higher-order terms that were preventing us from increasing the evolution time t when testing for locality. We will need the following results that let us characterize the individual terms of the Taylor expansion.

Fact 15.

For any matrix M, σP|(IM)|σQ=Tr(PMQ)2n.

Proof.

σP|(IM)|σQ=12nx,y{0,1}n(x|x|P)(|yMQ|y)
=12nx,y{0,1}nx|yx|PMQ|y=12nx{0,1}nx|PMQ|x=Tr(PMQ)2n

Lemma 16.

σIn|A|σIn=0.

Proof.

σIn|A|σIn=σIn|ΠD(InH)ΠD|σIn=σIn|InH|σIn
=12nTr(H)=0 (Fact 15)

recalling that we have assumed that Tr(H)=0.

Lemma 17.

For k2, |σIn|Ak|σIn|σIn|A2|σIn=H>k22.

Proof.

The first inequality follows because AH1, and the fact that H is Hermitian and so A is too, meaning that every eigenvalue of Ak is non-increasing in magnitude as a function of k, and non-negative when k is even.

For the second equality, we observe that

A|σIn=ΠD(InH)ΠD|σIn=ΠD(InH)|σIn=(InH>k)|σIn,

as H has no identity component. By Fact 15,

σIn|A2|σIn=σIn|In(H>k)2|σIn=12nTr((H>k)2)=H>k22.

Combining Lemmas 14, 16, and 17, we are able to give bounds on the acceptance probability of Algorithm 1 (assuming it does not terminate early) based on how close or far H is from being k-local. This gives us an algorithm for testing locality, through repetition of Algorithm 1 and concentration of measure.

Lemma 18.

Let εH>k2. The probability that Algorithm 1 outputs 1, conditioned on not terminating early, is at least ε2t2(1310ε2t2)72εαt2 and no more than ε2t2(1+110t2)+28780εαt2+491600ε2αt2.888The ε2 in the 491600ε2αt2 term of the upper bound is intended and not a typo.

Proof.

At the end of Algorithm 1 (assuming it did not terminate early), the final state lies in D. By Lemma 14 and the definition of the final measurement, the probability that the algorithm outputs 1 is the squared length of the component of |ψeiAt|σIn+|Δ along the complement of |σIn, for some Δ such that |Δ22αt. So by the triangle inequality, Pr[X=1] is in the range999One might think to use 1|σIn|(eiAt|σIn+|Δ)|2 followed by the triangle inequality, but this actually leads to a lossy analysis of the number of queries used.

((1|σIn|eiAt|σIn|2|Δ2)2,(1|σIn|eiAt|σIn|2+|Δ2)2).

To analyze |σIn|eiAt|σIn|, we note that because A is Hermitian, σIn|Ak|σIn is real-valued for all k0. By splitting up the Taylor expansion of the matrix exponential into real and imaginary terms, we see that

|σIn|eiAt|σIn|2=|σIn|(m=0(i)mAmtmm!)|σIn|2
=|σIn|(m=0(1)mA2mt2m(2m)!)|σIn|2+|σIn|(m=0(1)m+1A2m+1t2m+1(2m+1)!)|σIn|2.

Analyzing the first term, we see that

|σIn|(m=0(1)mA2mt2m(2m)!)|σIn|
=|σIn|(I2nt22A2+m=2(1)mA2mt2m(2m)!)|σIn|
=|Tr(In)2nt22σIn|A2|σIn+σIn|(m=2(1)mA2mt2m(2m)!)|σIn| (Fact 15)
=|1ε2t22+m=2(1)mσIn|A2mt2m(2m)!|σIn| (Lemma 17)
=1ε2t22+ηreal

where |ηreal|ε2t424cosh(t)ε2t420 by Fact 10, Lemma 17, the triangle inequality, and the fact that t12.
Then, for the second term, we have

ηimaginary |σIn|(m=0(1)mA2m+1t2m+1(2m+1)!)|σIn|
= |σIn|(A+m=1(1)m+1A2m+1t2m+1(2m+1)!)|σIn|
= |σIn|(m=1(1)mA2m+1t2m+1(2m+1)!)|σIn| (Lemma 16)
ε2m=1t2m+1(2m+1)! (Lemma 17)
ε2t36cosh(t)110ε2t2. (Fact 10)

Since

|σIn|eiAt|σIn|2=(1ε2t22+ηreal)2+ηimaginary2,

we can upper bound it by (1ε2t22+|ηreal|)2+ηimaginary2 and, as ηimaginary0, lower bound it by (1ε2t22|ηreal|)2.

We can therefore upper bound the probability of Algorithm 1 accepting by

(1|σIn|eiAt|σIn|2+|Δ2)2
(1(1ε2t22|ηreal|)2+74αt)2 (Lemma 14)
(ε2t2+2|ηreal|+74αt)2
ε2t2+2|ηreal|+72αtε2t2+110ε2t4+4916α2t2
ε2t2(1+110t2)+28780εαt2+491600ε2αt2 (t0.5,αε2100)

and lower bound it by

(1|σIn|eiAt|σIn|2|Δ2)2
(1(1ε2t22+|ηreal|)2ηimaginary2|Δ2)2
ε2t2(ε2t22+|ηreal|)2|ηimaginary|272εαt2
ε2t2(1310ε2t2)72εαt2.

Theorem 1. [Restated, see original statement.]

Let 0ε1<ε21, δ(0,1), and k. There is an algorithm that distinguishes whether an n-qubit Hamiltonian H is (1) within ε1 of some k-local Hamiltonian or (2) ε2-far from all k-local Hamiltonians, with probability 1δ. The algorithm uses O(ε2(ε2ε1)7log(1/δ)) non-adaptive queries to the time evolution operator with O(ε2(ε2ε1)5log(1/δ)) total evolution time.

Proof.

By Lemma 18 the output of Algorithm 1, conditioned on succeeding, is a Bernoulli random variable Xi with bounded expectation. That is, when εε2 then

𝔼[Xi]ε22t2(1310ε22t2)72ε2αt2

and when εε1 then

𝔼[Xi]ε12t2(1+110t2)+28780ε1αt2+491600ε2αt2.

Let

τ 12[ε22t2(1310ε22t2)72ε2αt2+ε12t2(1+110t2)+28780ε1αt2+491600ε2αt2]

then be the halfway point these two values, and our decision threshold. And for convenience let

ξ12[ε22t2(1310ε22t2)72ε2αt2ε12t2(1+110t2)28780ε1αt2491600ε2αt2]

be a lower bound on the distance from τ to our bounds on 𝔼[Xi]. Observe that ε1<ε21, ε2α=ε22ε12100 and t=ε22ε122ε2 so:

980(ε22ε1)2ε2212(ε22ε12)t215ε22t4ξε22ε122t2ε22t22.

Now say that we have i.i.d samples {X1,,Xs} from successful runs of Algorithm 1 for s to be determined and let Xi=1sXi. If εε2, then by (Bernstein’s inequality). the probability that Xsτ is at most:

Pr[i=1sXisτ] =Pr[X𝔼[X]sτ𝔼[X]]
exp[(sτ𝔼[X])22s𝔼[X](1𝔼[X])+𝔼[X]sτ3]
exp[(sτ𝔼[X])22(s𝔼[X]+𝔼[X]sτ3)]
exp[sξ22(ε22t2+ξ3)]
exp[3sξ27ε22t2]
exp[s46.5(ε22ε12)3ε24]

where the fourth line follows due to the expression in the exponential being monotonically increasing with respect to 𝔼[X](τ,1]. Likewise, if εε1 then the probability that Xsτ is at most:

Pr[i=1sXisτ] =Pr[X𝔼[X]sτ𝔼[X]]
exp[(sτ𝔼[X])22s𝔼[X](1𝔼[X])+sτ𝔼[X]3]
exp[(sτ𝔼[X])22(s𝔼[X]+sτ𝔼[X]3)]
exp[sξ22(ε12t2(1+110t2)+28780ε1αt2+491600ε2αt2+ξ3)]
exp[sξ22(ε22t2(1+140+287800+4916000+16))]
(ε1<ε2,t0.5,αε2100)
exp[s55.9(ε22ε12)3ε24]

where the fourth line also follows due to the expression in the exponential being monotonically decreasing with respect to 𝔼[X][0,τ). Therefore, setting

s=55.9ε24(ε22ε12)3ln(2/δ)

suffices for us to succeed at distinguishing the two cases with probability at most 1δ/2.

Algorithm 1 has an 9998αt<9919600(ε22ε12)3/2ε229919600 chance of failure. By applying Corollary 6,

s=219919600(s+ln(2/δ))115ε24(ε22ε12)3ln(2/δ)

suffices to achieve s successful runs with probability 1δ/2. By a union bound, we will correctly differentiate the two cases with probability at least 1δ.

The total time complexity used is then

st 115ε24(ε22ε12)3ln(2/δ)ε22ε122ε258ε23((ε2ε1)(ε2+ε1))5/2log(2/δ)
58ε2(ε2ε1)5log(2/δ)=O(ε2(ε2ε1)5log(1/δ)),

with a total number of queries of

sm =stα58ε23(ε22ε12)5/2log(2/δ)100ε2ε22ε125800ε24(ε22ε12)7/2log(2/δ)
5800ε2(ε2ε1)7=O(ε2(ε2ε1)7).

References

  • [1] Dorit Aharonov, Itai Arad, and Thomas Vidick. The quantum pcp conjecture, 2013. arXiv:1309.7495.
  • [2] Anurag Anshu, Srinivasan Arunachalam, Tomotaka Kuwahar, and Mehdi Soleimanifar. Sample-efficient learning of interacting quantum systems. Nature Physics, 17:931–935, August 2021. doi:10.1038/s41567-021-01232-0.
  • [3] Srinivasan Arunachalam, Arkopal Dutt, and Francisco Escudero Gutiérrez. Testing and learning structured quantum hamiltonians, 2024. arXiv:2411.00082.
  • [4] Ainesh Bakshi, Allen Liu, Ankur Moitra, and Ewin Tang. Learning quantum hamiltonians at any temperature in polynomial time. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 1470–1477, New York, NY, USA, 2024. Association for Computing Machinery. doi:10.1145/3618260.3649619.
  • [5] Ainesh Bakshi, Allen Liu, Ankur Moitra, and Ewin Tang. Structure learning of hamiltonians from real-time evolution. In 2024 IEEE 65th Annual Symposium on Foundations of Computer Science (FOCS), pages 1037–1050, 2024. doi:10.1109/FOCS61266.2024.00069.
  • [6] Andreas Bluhm, Matthias C. Caro, and Aadil Oufkir. Hamiltonian Property Testing, 2024. arXiv:2403.02968.
  • [7] Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. Quantum Amplitude Amplification and Estimation, 2002. doi:10.1090/conm/305/05215.
  • [8] Andrew M. Childs, Dmitri Maslov, Yunseong Nam, Neil J. Ross, and Yuan Su. Toward the first quantum simulation with quantum speedup. Proceedings of the National Academy of Sciences, 115(38):9456–9461, 2018. doi:10.1073/pnas.1801723115.
  • [9] Avshalom C. Elitzur and Lev Vaidman. Quantum mechanical interaction-free measurements. Foundations of Physics, 23:987–997, 1993. doi:10.1007/BF00736012.
  • [10] P Facchi and S Pascazio. Quantum zeno dynamics: mathematical and physical aspects. Journal of Physics A: Mathematical and Theoretical, 41(49):493001, October 2008. doi:10.1088/1751-8113/41/49/493001.
  • [11] Sabee Grewal, Vishnu Iyer, William Kretschmer, and Daniel Liang. Low-Stabilizer-Complexity Quantum States Are Not Pseudorandom. In Yael Tauman Kalai, editor, 14th Innovations in Theoretical Computer Science Conference (ITCS 2023), volume 251 of Leibniz International Proceedings in Informatics (LIPIcs), pages 64:1–64:20, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ITCS.2023.64.
  • [12] Francisco Escudero Gutiérrez. Simple algorithms to test and learn local Hamiltonians, 2024. arXiv:2404.06282.
  • [13] J. Haah, R. Kothari, R. O’Donnell, and E. Tang. Query-optimal estimation of unitary channels in diamond distance. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 363–390, Los Alamitos, CA, USA, November 2023. IEEE Computer Society. doi:10.1109/FOCS57990.2023.00028.
  • [14] Jeongwan Haah, Robin Kothari, and Ewin Tang. Learning quantum hamiltonians from high-temperature gibbs states and real-time evolutions. Nature Physics, 20:1027–1031, June 2024. doi:10.1038/s41567-023-02376-x.
  • [15] Hsin-Yuan Huang, Yu Tong, Di Fang, and Yuan Su. Learning many-body hamiltonians with heisenberg-limited scaling. Phys. Rev. Lett., 130:200403, May 2023. doi:10.1103/PhysRevLett.130.200403.
  • [16] Seth Lloyd. Universal quantum simulators. Science, 273(5278):1073–1078, 1996. doi:10.1126/science.273.5278.1073.
  • [17] Ashley Montanaro and Tobias J. Osborne. Quantum boolean functions, 2010. arXiv:0810.2435.
  • [18] Ashley Montanaro and Ronald de Wolf. A Survey of Quantum Property Testing. Number 7 in Graduate Surveys. Theory of Computing Library, 2016. doi:10.4086/toc.gs.2016.007.
  • [19] Adrian She and Henry Yuen. Unitary Property Testing Lower Bounds by Polynomials. In Yael Tauman Kalai, editor, 14th Innovations in Theoretical Computer Science Conference (ITCS 2023), volume 251 of Leibniz International Proceedings in Informatics (LIPIcs), pages 96:1–96:17, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ITCS.2023.96.
  • [20] Ramgopal Venkateswaran and Ryan O’Donnell. Quantum Approximate Counting with Nonadaptive Grover Iterations. In Markus Bläser and Benjamin Monmege, editors, 38th International Symposium on Theoretical Aspects of Computer Science (STACS 2021), volume 187 of Leibniz International Proceedings in Informatics (LIPIcs), pages 59:1–59:12, Dagstuhl, Germany, 2021. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.STACS.2021.59.
  • [21] Mark M Wilde. Quantum Information Theory. Cambridge university press, 2 edition, 2017.

Appendix A Lower Bound

We will utilize the following fact about diamond distance of unitaries that will make calculations easier, at a loss of some constant factors.

Fact 19 ([13, Proposition 1.6]).

For all unitaries U and V of equal dimension,

12UVminθ[0,2π)eiθUVUV.

We now show our lower bound for k-locality testing, simply by showing that the statistical distance of the resulting unitaries (i.e., diamond distance) only grows linearly with time.

Definition 20.

For 0kn, we define

Z1:ki=1kZj=k+1nI

to be the tensor product of Z on the first k qubits and identity on the last nk qubits.

Lemma 21.

For 0ε1ε2

eiZ1:kε1teiZ1:kε2t2(ε1ε2)t.

Proof.

Since Z1:k is diagonal with ±1 entries, eiZ1:kεt is diagonal with entries eiεt. Therefore, the eigenvalues of eiθeiZ1:kε1teiZ1:kε2t can be directly calculated, giving us

minθ[0,2π)eiθeiZ1:kε1teiHε2t
=minθ[0,2π)max(|ei(θε1t)eiε2t|,|ei(θ+ε1t)eiε2t|)
=min(|eiε1teiε2t|,|eiε1t+eiε2t|)
=2min(|sin((ε2ε1)t2)|,|cos((ε2ε1)t2)|)
(ε2ε1)t,

where one of θ{0,π} minimizes the value via symmetry. By Fact 19, eiZ1:kε1teiZ1:kε2t2(ε1ε2)t.101010A direct calculation of the diamond distance will give an upper bound of (ε2ε1)t, without the factor of 2 from 19. See [14, Proof of Proposition 1.6].

 Remark 22.

Lemma 21 easily extends to the scenario where one is allowed to make calls to the inverse oracle, controlled versions of the oracle, the complex conjugate of the oracle, and any combination of these augmentations, as the diamond distance between the corresponding unitaries can be bounded as a function of time evolution.

We are now ready to prove our tolerant locality testing lower bound by reducing to Lemma 21. See 2

Proof.

Observe that for any k>k, H1ε1Z1:k is within ε1 of being k-local and H2ε2Z1:k is likewise ε2-far from being k-local. H1H21 is also satisfied. Let ti be the time evolution for each query in our algorithm. By Lemma 21, the diamond distance between the time evolution of these two cases is at most 2(ε2ε1)ti for each query. By the sub-additivity of diamond distance, a total time evolution of iti=Ω((ε2ε1)1) is required to distinguish H1 and H2 with constant probability.

 Remark 23.

Theorem 2 also holds when the distance to k-locality is determined by operator norm , any normalized schatten p-norm Xp12n/pTr(|X|p)1p, or any Pauli decomposition p-norm XPauli,p(P𝒫n|αP|p)1p for X=P𝒫nαPP, improving upon that of [6, Theorem 3.6]. This is simply because the distance of εZ1:k (for k>k) from being k-local is exactly ε for all of these distance measures.

Appendix B Optimal Tolerant Testing with Inverse Queries

In this section we augment the tolerant testing algorithm in [12, 3], with amplitude estimation to get an optimal tolerant tester when given access to controlled versions of the forward and reverse time evolution.111111Using the multiplicative error form from [20] should allow for one to remove the need for controlled access while remaining non-adaptive, though it causes the constants to blow-up.

We begin with the following crucial result of Gutiérrez.

Lemma 24 ([3, Lemma 3.1]).

Let 0ε1ε21. Let αε2ε13c and H be an n-qubit Hamiltonian with H=1. Define UeiHα, and let U>k be U|σIn projected onto onto the space spanned by {(IP)|σIn:P{I,X,Y,Z}n,|P|>k}. We have that if H is ε1-close to being k-local, then

U>k22((ε2ε1)2ε1+ε29c)2,

and if H is ε2-far from being k-local, then

U>k22((ε2ε1)ε1+2ε29c)2.

We also cite the following result of [11], which itself follows as a corollary of the celebrated Quantum Amplitude Estimation [7, Theorem 12] result.

Lemma 25 (Quantum Amplitude Estimation [11, Corollary 29]).

Let Π be a projector and |ψ be an n-qubit pure state such that ψ|Π|ψ=η. Given access to the unitary transformations RΠ=2ΠI and Rψ=2|ψψ|I, there exists a quantum algorithm that outputs η^ such that

|η^η|ξ

with probability at least 8π2. The algorithm makes no more than πη(1η)+ξξ calls to the controlled versions of RΠ and Rψ.

In particular, this implies that if we have (controlled) query access to U, U for some unitary U, and a known state |ϕ, we can estimate η=ΠU|ϕ22 to ζ accuracy by defining |ψU|ϕ and implementing Rψ with controlled applications of U.

We are now ready to state the algorithm, which can be seen as the algorithm of [12, 3] augmented with Lemma 25.

Theorem 4. [Restated, see original statement.]

Let 0ε1<ε21, δ(0,1), and k. There is an algorithm that tests whether an n-qubit Hamiltonian H is (1) ε1-close to some k-local Hamiltonian or (2) ε2-far from all k-local Hamiltonians, with probability 1δ. The algorithm uses O(log(1/δ)(ε2ε1)2) non-adaptive queries to the time evolution operator and its inverse, with O(log(1/δ)ε2ε1) total evolution time.

Proof.

Let UeiHα as in Lemma 24. We apply Lemma 24 with Π the projector onto the space spanned by {(IP)|σIn:P{I,X,Y,Z}n,|P|>k} to estimate U>k22. Observe that the absolute difference between the two terms in Lemma 24 is

((ε2ε1)ε1+2ε29c)2((ε2ε1)2ε1+ε29c)2=(ε2ε1)3(ε2+ε1)27c2.

Therefore, we can distinguish the two cases to constant success probability by estimating η=U>k22 to error ζ=(ε2ε1)3(ε2+ε1)54c2. By Lemma 25, the number of queries is then no more than

π(ε2ε1)2(ε1+2ε2)2/(81c2)+(ε2ε1)3(ε1+ε2)/(54c2)(ε2ε1)3(ε1+ε2)/(54c2)
= 54πc(ε2ε1)2(ε1+2ε2)2/81+(2ε22ε1)(2ε1+2ε2)/216ε1+ε2
54πc(ε2ε1)2(2ε1+2ε2)2/81+(2ε1+2ε2)2/216ε1+ε2
54πc(ε2ε1)211(2ε1+2ε2)2/648ε1+ε2
322πc(ε2ε1)2.

Since the Hamiltonian is applied for αε2ε13c for each query, the total evolution of the Hamiltonian is at most

322πc(ε2ε1)2ε2ε13c=22πε2ε1.

By standard error reduction, we can reduce the constant failure probability to at most δ using log(1/δ) repetitions.

Finally, observe that constructing RΠ (and its controlled version), as in Lemma 25 is free, as Π is a known projector onto the low locality Paulis. On the other hand, Rψ requires us to take (a version of) the Grover Diffusion operator D2|00|I and conjugate it by U. This is the step that requires access to UeiHα.

Since this matches the lower bound of Theorem 2, Theorem 4 is optimal.