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 e−i⁢H⁢t. In this setting the natural measure of cost is total evolution time, ∑jtj where the jth application of the time evolution operator is e−i⁢H⁢tj.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⁢ε2−0.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<ε2≤1, δ∈(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)7⁢log⁡(1/δ)) non-adaptive queries to the time evolution operator with O(ε2(ε2−ε1)5⁢log⁡(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 e−i⁢t⁢H, our lower bound also applies to algorithms using either of these tools.

Theorem 2.

Let 0≤ε1<ε2≤1 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 ∥H∥∞≤1 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<ε2≤1, δ∈(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 2⁢n qubit states ℂ22⁢n has the Bell basis (|σP⟩)P, where P spans the n-fold Paulis, |σI⊗n⟩ is the maximally entangled state 12n⁢∑x∈{0,1}n|x⟩⊗|x⟩, and |σP⟩=(I⊗n⊗P)⁢|σI⊗n⟩. Therefore, for any unitary U, if we apply I⊗n⊗U to |σI⊗n⟩ 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αp⁢P. 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,

e−i⁢H⁢t≈I⊗n−i⁢H⁢t

for small enough t, we can set U=e−i⁢H⋅t 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(t−1⋅ε−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 ∥H∥∞≤1, 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 |σI⊗n⟩ with probability

|⟨σI⊗n|(I⊗n⊗e−i⁢H>k⁢t)|σI⊗n⟩|2
=|⟨σI⊗n|(I⊗n⊗(∑ℓ=0∞(H>k)ℓ⁢(i⁢t)ℓℓ!))|σI⊗n⟩|2
=|1+⟨σI⊗n|(I⊗n⊗(∑ℓ=2∞(H>k)ℓ⁢(i⁢t)ℓℓ!))|σI⊗n⟩|2
=1−⟨σI⊗n|(I⊗n⊗(H>k)2)|σI⊗n⟩+∑ℓ=3∞O(tℓ⋅|⟨σI⊗n|(I⊗n⊗(H>k)ℓ)|σI⊗n⟩|)

as H contains no identity term.

To tame this infinite series, imagine that ∥H>k∥∞≤1 (we will eventually evolve by a related operator A that does satisfy ∥A∥∞≤1). Then we have

|⟨σI⊗n|(I⊗n⊗(H>k)ℓ)|σI⊗n⟩|≤⟨σI⊗n|(I⊗n⊗(H>k)2)|σI⊗n⟩

for all integers ℓ≥2, so as long as t is a sufficiently small constant, we have that |⟨σI⊗n|(I⊗n⊗e−i⁢H>k⁢t)|σI⊗n⟩|2 is at least

1−0.99⋅⟨σI⊗n|(I⊗n⊗(H>k)2)|σI⊗n⟩=1−0.99⋅Tr⁡((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 e−i⁢H>k⁢t 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 e−i⁢H>k⋅t 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 e−i⁢H>k⁢t. However, when starting at |σI⊗n⟩, 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 |σI⊗n⟩ once again, we apply I⊗n⊗e−i⁢H⁢t′ for t′=O(ε), measure with {ΠD,I⊗2⁢n−ΠD}, and then post-select on the measurement result ΠD. We then repeat our application of I⊗n⊗e−i⁢H⁢t′ and post-selection, for O(1/t′) iterations, provided our post-selection succeeds each time.

As we start with |σI⊗n⟩, then make small adjustments (i.e., e−i⁢H⁢t≈I⊗2⁢n 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 1−O(ε). Now, as we are taking small steps, we can approximate each iteration of ΠD⁢(I⊗n⊗e−i⁢H⋅O(ε))⁢ΠD as

ΠD⁢(I⊗n⊗e−i⁢H⋅O(ε))⁢ΠD=ΠD⁢(I⊗n⊗∑ℓ=0∞Hℓ⁢(−i)ℓ⁢O(εℓ)ℓ!)⁢ΠD=e−i⁢A⋅O(ε)+R

where we define A≔ΠD⁢(I⊗n⊗H)⁢ΠD and choose some ∥R∥∞≤O(ε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, A≠I⊗n⊗H>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 e−i⁢H⋅t, and so any identity term would manifest as an undetectable global phase., by construction A⁢|σI⊗n⟩=(I⊗n⊗H>k)⁢|σI⊗n⟩, and so ⟨σI⊗n|A2|σI⊗n⟩=⟨σI⊗n|I⊗(H>k)2|σI⊗n⟩. Combined with the fact that ∥A∥∞=∥ΠD⁢(I⊗n⊗H)⁢ΠD∥∞≤∥H∥∞≤1, we can argue that, if we iterate t/t′ times

⟨σI⊗n|∏i=1t/t′e−i⁢A⋅t′|σI⊗n⟩ =⟨σI⊗n|e−i⁢A⋅t|σI⊗n⟩
=⟨σI⊗n|(∑ℓ=0∞Aℓ⁢(−i⁢t)ℓℓ!)|σI⊗n⟩
=1−t2⁢⟨σI⊗n|H>k2|σI⊗n⟩+O(t3⋅ε2)

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

|⟨σI⊗n|Ak|σI⊗n⟩|≤∥A∥∞k−2⁢⟨σI⊗n|A2|σI⊗n⟩≤⟨σI⊗n|(I⊗n⊗(H>k)2)|σI⊗n⟩=ε2.

So as our method based on access to the time evolution operator of H>k only required distinguishing between ⟨σI⊗n|H>k|σI⊗n⟩ being Θ(ε2) and 0 we can emulate it with access to e−i⁢A⁢t 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 n−k qubits. We then set H1≔ε1⁢Z1:k and H2≔ε2⁢Z1:k. Because Z1:k is diagonal, so is e−i⁢ε⁢Z1:k⋅t, 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 t≥0 is the unitary matrix

e−i⁢H⁢t≔∑k=0∞Hk⁢(−i)k⁢tkk!.

We define the n-qubit Pauli matrices to be 𝒫⊗n≔{I,X,Y,Z}⊗n, where X=(0110), Y=(0−ii0), Z=(100−1). 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,B⟩≔Tr⁡(A†⁢B). 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αP⁢P, the locality of A is the largest |P| such that αP≠0. If A is a Hamiltonian (i.e., Hermitian) then all αP are real-valued. The normalized Frobenius norm is given by

∥A∥2=⟨A,A⟩2n=Tr⁡(A†⁢A)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, ∥A∥2≤∥A∥∞, recalling that ∥⋅∥2 is the normalized Frobenius norm. As a form of normalization and to be consistent with the literature, we will assume that ∥H∥∞≤1 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αP⁢P and subsequently A≤k≔∑|P|≤kαP⁢P. By the orthogonality of the Pauli matrices under the Frobenius inner product, A≤k is the k-local Hamiltonian that is closest to A with distance ∥A−A≤k∥2=∥A>k∥2.

Let B={|Φ+⟩,|Φ−⟩,|Ψ+⟩,|Ψ−⟩} denote the set containing the four Bell states. We will view B⊗n as a basis of ℂ2n⊗ℂ2n, 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 B⊗n is equal to (I⊗n⊗P)⁢|Φ+⟩⊗n for a unique P∈𝒫⊗n. We will write |σP⟩ for this basis element. As an example,

|Φ+⟩⊗n=|σI⊗n⟩=12n⁢∑x∈{0,1}n|x⟩⊗|x⟩.

If U=∑P∈𝒫⊗nαP⁢P 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 I⊗n⊗U to the state |σI⊗n⟩=|Φ+⟩⊗n and measuring in the Bell basis B⊗n 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ρ∥(I⊗n⊗Λ)(ρ)∥1 where the maximization is over all 2⁢n-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≤(1−t)⁢μ]≤e−t2⁢μ/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]=m⁢p and let γ≔1−dμ. By the (Multiplicative Chernoff Bound).,

Pr⁡[∑i=1mXi<d] =Pr⁡[∑i=1mXi<(1−γ)⁢μ]
≤exp⁡(−μ2⁢γ2)=exp⁡(−μ2−d22⁢μ+d)≤exp⁡(−m⁢p2+d).

Hence, as long as

m≥2⁢log⁡(1/δ)+2⁢dp,

then ∑i=1mXi≤d 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]≤e−t22σ2+t3⁢ and ⁢Pr⁡[X−μ≤−t]≤e−t22σ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 ∥H∥∞≤1, the first order Taylor series expansion of the matrix exponential gives

e−i⁢H⁢t=I⊗n−i⁢H⁢t+et⋅t22⁢R

for ∥R∥∞≤1.

Proof.

By the triangle inequality and the fact that ∥Hk∥∞≤∥H∥∞≤1 for k≥1:

∥e−i⁢H⁢t−(I⊗n−i⁢H⁢t)∥∞=‖∑k=2∞(−i)k⁢Hk⁢tkk!‖∞≤∑k=2∞∥Hk∥∞⁢tkk!≤∑k=2∞tkk!≤et⋅t22,

using Fact 8 at the end. Setting R≔2et⋅t2⁢(e−i⁢H⁢t−(I⊗n−i⁢H⁢t)) completes the proof. ◀

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

Fact 10.

If λ∈ℂ then

|∑k=ℓ∞λ2⁢k(2⁢k)!|≤|λ|2⁢ℓ(2⁢ℓ)!⁢cosh⁡(|λ|)

and

|∑k=ℓ∞λ2⁢k+1(2⁢k+1)!|≤|λ|2⁢ℓ+1(2⁢ℓ+1)!⁢cosh⁡(|λ|).

Proof.

|∑k=ℓ∞λ2⁢k(2⁢k)!|≤∑k=ℓ∞|λ2⁢k|(2⁢k)!=|λ|2⁢ℓ⁢∑k=0∞|λ|2⁢k(2⁢k+2⁢ℓ)!≤|λ|2⁢ℓ(2⁢ℓ)!⁢∑k=0∞|λ|2⁢k(2⁢k)!=|λ|2⁢ℓ(2⁢ℓ)!⁢cosh⁡(|λ|)

and

|∑k=ℓ∞λ2⁢k+1(2⁢k+1)!| ≤∑k=ℓ∞|λ2⁢k+1|(2⁢k+1)!=|λ|2⁢ℓ+1⁢∑k=0∞|λ|2⁢k(2⁢k+2⁢ℓ+1)!
≤|λ|2⁢ℓ+1(2⁢ℓ+1)!⁢∑k=0∞|λ|2⁢k(2⁢k)!=|λ|2⁢ℓ+1(2⁢ℓ+1)!⁢cosh⁡(|λ|).

◀

4.1 Algorithm

Definition 11.

We will use D to denote the subspace of ℂ2n⊗ℂ2n 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⁢(I⊗n⊗H)⁢Π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 e−i⁢α⁢H sandwiched by {ΠD,I⊗2⁢n−Π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 m≔t/α=50ε22−ε12 be the number of iterations used in line 2. In our analysis will frequently use the fact that α≤ε2100≤1100 and t≤0.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 |σI⊗n⟩ by e−i⁢A⁢t, 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 e−i⁢A⁢α and ΠD⁢(I⊗n⊗e−i⁢H⁢α)⁢Π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 e−i⁢t⁢A=ΠD⁢(I⊗n⊗e−i⁢t⁢H)⁢Π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(α2⁢m)=O(α⁢t).

Lemma 13.

Let H=∑P∈𝒫⊗nαP⁢P be any Hamiltonian with ∥H∥∞≤1. Then,

ΠD⁢(I⊗n⊗e−i⁢α⁢H)⁢ΠD=e−i⁢α⁢A+η

where ∥η∥∞≤eα⋅α2.

Proof.

By Taylor expanding the complex exponential of e−i⁢α⁢H and applying Corollary 9, we get

ΠD⁢(I⊗n⊗e−i⁢α⁢H)⁢ΠD =ΠD⁢(I⊗n⊗(I⊗n−i⁢α⁢H+eα⋅α22⁢R))⁢ΠD
=I⊗2⁢n−i⁢α⁢A+et⋅α22⁢R′

where ∥R′∥∞≤∥I⊗n⊗R∥∞=∥R∥∞≤1.

Next, we observe that ∥A∥∞≤∥I⊗n⊗H∥∞=∥H∥∞≤1 and that A is Hermitian by symmetry. We can then Taylor expand e−i⁢α⁢A to get

e−i⁢α⁢A=I⊗2⁢n−i⁢α⁢A+eα⋅α22⁢Q

where ∥Q∥∞≤1. By the triangle inequality, the difference

η≔ΠD⁢(I⊗n⊗e−i⁢α⁢H)⁢ΠD−e−i⁢α⁢A

between these two linear transformations satisfies

∥η∥∞≤∥R′∥∞⋅eα⋅α22+∥Q∥∞⋅eα⋅α22≤eα⋅α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, |ϕ⟩=e−i⁢A⁢t⁢|σI⊗n⟩+|Δ⟩ just before the final measurement, with ∥|Δ⟩∥2≤74⁢α⁢t.

Proof.

Note that the algorithm can only be terminated early if, in one of the loop iterations, the measurement in line 4 returns I⊗2⁢n−ΠD. At the start of the iteration |ϕ⟩=|σI⊗n⟩∈D. Since |ϕ⟩ remains within D after each successful iteration, by Taylor expanding the exponential, and applying Corollary 9 to obtain a suitable R with ∥R∥∞≤1, the probability of failure at each iteration is at most

‖(I⊗2⁢n−ΠD)⁢(I⊗n⊗e−i⁢H⁢α)⁢ΠD⁢|ϕ⟩‖22
=‖(I⊗2⁢n−ΠD)⁢(I⊗n⊗(I⊗n−i⁢α⁢H+α22⁢eα⁢R))⁢|ϕ⟩‖22
=‖(I⊗2⁢n−ΠD)⁢(−i⁢α⁢(I⊗n⊗H)+α22⁢eα⁢(I⊗n⊗R))⁢|ϕ⟩‖22
≤(α⁢∥H∥∞+α2⁢eα2⁢∥R∥∞)2
≤(1+α⁢eα+α24⁢e2⁢α)⁢α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⁢(I⊗n⊗e−i⁢α⁢H)⁢|ϕ⟩=ΠD⁢(I⊗n⊗e−i⁢α⁢H)⁢ΠD⁢|ϕ⟩,

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

∏i=1mΠD⁢(I⊗n⊗e−i⁢α⁢H)⁢ΠD⁢|σI⊗n⟩

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

∏i=1m(e−i⁢α⁢A+η)⁢|σI⊗n⟩=(∑k=0m(mk)⁢e−i⁢α⁢A⁢(m−k)⋅ηk)⁢|σI⊗n⟩

for ∥η∥∞≤α2⁢eα. The distance of the un-normalized vector from e−i⁢A⁢t⁢|σI⊗n⟩ is then

‖e−i⁢A⁢t⁢|σI⊗n⟩−∏i=1m(e−i⁢A⁢t+η)⁢|σI⊗n⟩‖2=‖(∑k=1m(mk)⁢e−i⁢α⁢A⁢(m−k)⋅ηk)⁢|σI⊗n⟩‖2
≤∑k=1mmk⁢∥η∥∞k≤∑k=1m(m⁢α2⁢eα)k≤∑k=1∞(m⁢α2⁢eα)k=m⁢α2⁢eα⁢11−m⁢α2⁢eα=α⁢t⁢eα⁢11−α⁢t⁢eα.

Finally, to bound the error introduced by normalization, for each r∈[m], write |ϕr⟩≔∏i=1rΠD⁢(I⊗n⊗e−i⁢α⁢H)⁢ΠD⁢|σI⊗n⟩ 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 I⊗2⁢n−ΠD result is at most 9998⁢α2, |ϕr⟩ is separated from e−i⁢A⁢t⁢|ϕr−1⟩ by an orthogonal vector of length at most 9998⁢α⁢∥e−i⁢A⁢t⁢|ϕr−1⟩∥2=9998⁢α⁢∥|ϕr−1⟩∥2. Therefore,

∥|ϕr⟩∥2≥∥|ϕr−1⟩∥2⁢1−9998⁢α2≥∥|ϕr−1⟩∥2−0.6⁢9998⁢α2

where the last inequality follows from the fact that 1−1−x≤0.6⁢x for x∈[0,59] and 9998⁢α2<59. The total additional error from the normalization is then at most 297490⁢α2⁢m=297490⁢α⁢t. By the triangle inequality, the total distance from e−i⁢A⁢t⁢|σI⊗n⟩ is at most

297490⁢α⁢t+t⁢α⁢eα⁢11−α⁢t⁢eα≤74⁢α⁢t.

◀

We now show that (approximately) applying e−i⁢A⁢t instead of I⊗n⊗e−i⁢H⁢t 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|(I⊗M)|σQ⟩=Tr⁡(P⁢M⁢Q)2n.

Proof.

⟨σP|(I⊗M)|σQ⟩=12n⁢∑x,y∈{0,1}n(⟨x|⊗⟨x|⁢P)⁢(|y⟩⊗M⁢Q⁢|y⟩)
=12n⁢∑x,y∈{0,1}n⟨x|y⟩⋅⟨x|P⁢M⁢Q|y⟩=12n⁢∑x∈{0,1}n⟨x|P⁢M⁢Q|x⟩=Tr⁡(P⁢M⁢Q)2n

◀

Lemma 16.

⟨σI⊗n|A|σI⊗n⟩=0.

Proof.

⟨σI⊗n|A|σI⊗n⟩=⟨σI⊗n|ΠD⁢(I⊗n⊗H)⁢ΠD|σI⊗n⟩=⟨σI⊗n|I⊗n⊗H|σI⊗n⟩
=12n⁢Tr⁡(H)=0 (Fact 15)

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

Lemma 17.

For k≥2, |⟨σI⊗n|Ak|σI⊗n⟩|≤⟨σI⊗n|A2|σI⊗n⟩=∥H>k∥22.

Proof.

The first inequality follows because ∥A∥∞≤∥H∥∞≤1, 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⁢|σI⊗n⟩=ΠD⁢(I⊗n⊗H)⁢ΠD⁢|σI⊗n⟩=ΠD⁢(I⊗n⊗H)⁢|σI⊗n⟩=(I⊗n⊗H>k)⁢|σI⊗n⟩,

as H has no identity component. By Fact 15,

⟨σI⊗n|A2|σI⊗n⟩=⟨σI⊗n|I⊗n⊗(H>k)2|σI⊗n⟩=12n⁢Tr⁡((H>k)2)=∥H>k∥22.

◀

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>k∥2. The probability that Algorithm 1 outputs 1, conditioned on not terminating early, is at least ε2⁢t2⁢(1−310⁢ε2⁢t2)−72⁢ε⁢α⁢t2 and no more than ε2⁢t2⁢(1+110⁢t2)+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 |ψ⟩≔e−i⁢A⁢t⁢|σI⊗n⟩+|Δ⟩ along the complement of |σI⊗n⟩, for some Δ such that ∥|Δ⟩∥2≤2⁢α⁢t. So by the triangle inequality, Pr⁡[X=1] is in the range999One might think to use 1−|⟨σI⊗n|⁢(e−i⁢A⁢t⁢|σI⊗n⟩+|Δ⟩)|2 followed by the triangle inequality, but this actually leads to a lossy analysis of the number of queries used.

((1−|⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|2−∥|Δ⟩∥2)2,(1−|⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|2+∥|Δ⟩∥2)2).

To analyze |⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|, we note that because A is Hermitian, ⟨σI⊗n|Ak|σI⊗n⟩ is real-valued for all k≥0. By splitting up the Taylor expansion of the matrix exponential into real and imaginary terms, we see that

|⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|2=|⟨σI⊗n|(∑m=0∞(−i)m⁢Am⁢tmm!)|σI⊗n⟩|2
=|⟨σI⊗n|(∑m=0∞(−1)m⁢A2⁢m⁢t2⁢m(2⁢m)!)|σI⊗n⟩|2+|⟨σI⊗n|(∑m=0∞(−1)m+1⁢A2⁢m+1⁢t2⁢m+1(2⁢m+1)!)|σI⊗n⟩|2.

Analyzing the first term, we see that

|⟨σI⊗n|(∑m=0∞(−1)m⁢A2⁢m⁢t2⁢m(2⁢m)!)|σI⊗n⟩|
=|⟨σI⊗n|(I⊗2⁢n−t22⁢A2+∑m=2∞(−1)m⁢A2⁢m⁢t2⁢m(2⁢m)!)|σI⊗n⟩|
=|Tr⁡(I⊗n)2n−t22⁢⟨σI⊗n|A2|σI⊗n⟩+⟨σI⊗n|(∑m=2∞(−1)m⁢A2⁢m⁢t2⁢m(2⁢m)!)|σI⊗n⟩| (Fact 15)
=|1−ε2⁢t22+∑m=2∞(−1)m⁢⟨σI⊗n|A2⁢m⁢t2⁢m(2⁢m)!|σI⊗n⟩| (Lemma 17)
=1−ε2⁢t22+ηreal

where |ηreal|≤ε2⁢t424⁢cosh⁡(t)≤ε2⁢t420 by Fact 10, Lemma 17, the triangle inequality, and the fact that t≤12.
Then, for the second term, we have

ηimaginary≔ |⟨σI⊗n|(∑m=0∞(−1)m⁢A2⁢m+1⁢t2⁢m+1(2⁢m+1)!)|σI⊗n⟩|
= |⟨σI⊗n|(A+∑m=1∞(−1)m+1⁢A2⁢m+1⁢t2⁢m+1(2⁢m+1)!)|σI⊗n⟩|
= |⟨σI⊗n|(∑m=1∞(−1)m⁢A2⁢m+1⁢t2⁢m+1(2⁢m+1)!)|σI⊗n⟩| (Lemma 16)
≤ ε2⁢∑m=1∞t2⁢m+1(2⁢m+1)! (Lemma 17)
≤ ε2⁢t36⁢cosh⁡(t)≤110⁢ε2⁢t2. (Fact 10)

Since

|⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|2=(1−ε2⁢t22+ηreal)2+ηimaginary2,

we can upper bound it by (1−ε2⁢t22+|ηreal|)2+ηimaginary2 and, as ηimaginary≥0, lower bound it by (1−ε2⁢t22−|ηreal|)2.

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

(1−|⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|2+∥|Δ⟩∥2)2
≤(1−(1−ε2⁢t22−|ηreal|)2+74⁢α⁢t)2 (Lemma 14)
≤(ε2⁢t2+2⁢|ηreal|+74⁢α⁢t)2
≤ε2⁢t2+2⁢|ηreal|+72⁢α⁢t⁢ε2⁢t2+110⁢ε2⁢t4+4916⁢α2⁢t2
≤ε2⁢t2⁢(1+110⁢t2)+28780⁢ε⁢α⁢t2+491600⁢ε2⁢α⁢t2 (t≤0.5,α≤ε2100)

and lower bound it by

(1−|⟨σI⊗n|e−i⁢A⁢t|σI⊗n⟩|2−∥|Δ⟩∥2)2
≥(1−(1−ε2⁢t22+|ηreal|)2−ηimaginary2−∥|Δ⟩∥2)2
≥ε2⁢t2−(ε2⁢t22+|ηreal|)2−|ηimaginary|2−72⁢ε⁢α⁢t2
≥ε2⁢t2⁢(1−310⁢ε2⁢t2)−72⁢ε⁢α⁢t2.

◀

Theorem 1. [Restated, see original statement.]

Let 0≤ε1<ε2≤1, δ∈(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)7⁢log⁡(1/δ)) non-adaptive queries to the time evolution operator with O(ε2(ε2−ε1)5⁢log⁡(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]≥ε22⁢t2⁢(1−310⁢ε22⁢t2)−72⁢ε2⁢α⁢t2

and when ε≤ε1 then

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

Let

τ ≔12⁢[ε22⁢t2⁢(1−310⁢ε22⁢t2)−72⁢ε2⁢α⁢t2+ε12⁢t2⁢(1+110⁢t2)+28780⁢ε1⁢α⁢t2+491600⁢ε2⁢α⁢t2]

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

ξ≔12⁢[ε22⁢t2⁢(1−310⁢ε22⁢t2)−72⁢ε2⁢α⁢t2−ε12⁢t2⁢(1+110⁢t2)−28780⁢ε1⁢α⁢t2−491600⁢ε2⁢α⁢t2]

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

980⁢(ε22−ε1)2ε22≤12⁢(ε22−ε12)⁢t2−15⁢ε22⁢t4≤ξ≤ε22−ε122⁢t2≤ε22⁢t22.

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

Pr⁡[∑i=1sXi≤s⁢τ] =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⁢(ε22⁢t2+ξ3)]
≤exp⁡[−3⁢s⁢ξ27⁢ε22⁢t2]
≤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 X≥s⁢τ is at most:

Pr⁡[∑i=1sXi≥s⁢τ] =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⁢(ε12⁢t2⁢(1+110⁢t2)+28780⁢ε1⁢α⁢t2+491600⁢ε2⁢α⁢t2+ξ3)]
≤exp⁡[−s⁢ξ22⁢(ε22⁢t2⁢(1+140+287800+4916000+16))]
(ε1<ε2,t≤0.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)3⁢ln⁡(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ε22≤9919600 chance of failure. By applying Corollary 6,

s′=21−9919600⁢(s+ln⁡(2/δ))≤115⁢ε24(ε22−ε12)3⁢ln⁡(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

s′⁢t ≤115⁢ε24(ε22−ε12)3⁢ln⁡(2/δ)⋅ε22−ε122⁢ε2≤58⁢ε23((ε2−ε1)⁢(ε2+ε1))5/2⁢log⁡(2/δ)
≤58⁢ε2(ε2−ε1)5⁢log⁡(2/δ)=O(ε2(ε2−ε1)5⁢log⁡(1/δ)),

with a total number of queries of

s′⁢m =s′⁢tα≤58⁢ε23(ε22−ε12)5/2⁢log⁡(2/δ)⋅100⁢ε2ε22−ε12≤5800⁢ε24(ε22−ε12)7/2⁢log⁡(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,

12∥U−V∥⋄≤minθ∈[0,2⁢π)∥ei⁢θU−V∥∞≤∥U−V∥⋄.

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 0≤k≤n, we define

Z1:k≔⨂i=1kZ⊗⨂j=k+1nI

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

Lemma 21.

For 0≤ε1≤ε2

∥e−i⁢Z1:k⁢ε1⁢t−e−i⁢Z1:k⁢ε2⁢t∥⋄≤2⁢(ε1−ε2)⁢t.

Proof.

Since Z1:k is diagonal with ±1 entries, e−i⁢Z1:k⁢ε⁢t is diagonal with entries e∓i⁢ε⁢t. Therefore, the eigenvalues of ei⁢θ⋅e−i⁢Z1:k⁢ε1⁢t−e−i⁢Z1:k⁢ε2⁢t can be directly calculated, giving us

minθ∈[0,2⁢π)∥ei⁢θ⋅e−i⁢Z1:k⁢ε1⁢t−e−i⁢H⁢ε2⁢t∥∞
=minθ∈[0,2⁢π)⁡max⁡(|ei⁢(θ−ε1⁢t)−e−i⁢ε2⁢t|,|ei⁢(θ+ε1⁢t)−ei⁢ε2⁢t|)
=min⁡(|e−i⁢ε1⁢t−e−i⁢ε2⁢t|,|e−i⁢ε1⁢t+e−i⁢ε2⁢t|)
=2⁢min⁡(|sin⁡((ε2−ε1)⁢t2)|,|cos⁡((ε2−ε1)⁢t2)|)
≤(ε2−ε1)⁢t,

where one of θ∈{0,π} minimizes the value via symmetry. By Fact 19, ∥e−i⁢Z1:k⁢ε1⁢t−e−i⁢Z1:k⁢ε2⁢t∥⋄≤2⁢(ε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≔ε1⁢Z1:k′ is within ε1 of being k-local and H2≔ε2⁢Z1:k′ is likewise ε2-far from being k-local. ∥H1∥∞≤∥H2∥∞≤1 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 ∥X∥p≔12n/p⁢Tr⁢(|X|p)1p, or any Pauli decomposition p-norm ∥X∥Pauli,p≔(∑P∈𝒫⊗n|αP|p)1p for X=∑P∈𝒫⊗nαP⁢P, 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≤ε2≤1. Let α≔ε2−ε13⁢c and H be an n-qubit Hamiltonian with ∥H∥∞=1. Define U≔e−i⁢H⁢α, and let U>k be U⁢|σI⊗n⟩ projected onto onto the space spanned by {(I⊗P)⁢|σI⊗n⟩:P∈{I,X,Y,Z}⊗n,|P|>k}. We have that if H is ε1-close to being k-local, then

∥U>k∥22≤((ε2−ε1)⁢2⁢ε1+ε29⁢c)2,

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

∥U>k∥22≥((ε2−ε1)⁢ε1+2⁢ε29⁢c)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<ε2≤1, δ∈(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 U≔e−i⁢H⁢α as in Lemma 24. We apply Lemma 24 with Π the projector onto the space spanned by {(I⊗P)⁢|σI⊗n⟩:P∈{I,X,Y,Z}⊗n,|P|>k} to estimate ∥U>k∥22. Observe that the absolute difference between the two terms in Lemma 24 is

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

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

π⁢(ε2−ε1)2⁢(ε1+2⁢ε2)2/(81⁢c2)+(ε2−ε1)3⁢(ε1+ε2)/(54⁢c2)(ε2−ε1)3⁢(ε1+ε2)/(54⁢c2)
= 54⁢π⁢c(ε2−ε1)2⁢(ε1+2⁢ε2)2/81+(2⁢ε2−2⁢ε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)2⁢11⁢(2⁢ε1+2⁢ε2)2/648ε1+ε2
≤ 3⁢22⁢π⁢c(ε2−ε1)2.

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

3⁢22⁢π⁢c(ε2−ε1)2⁢ε2−ε13⁢c=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 D≔2⁢|0⟩⁢⟨0|−I and conjugate it by U. This is the step that requires access to U†≔ei⁢H⁢α. ◀

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