Abstract 1 Introduction 2 Commutator-based bounds 3 Lightcones and reclusive partitions 4 Additivity lemma 5 Identity check algorithm 6 Numerical experiments References Appendix A Proof of Lemma 6

Identity Check Problem for Shallow Quantum Circuits

Sergey Bravyi ORCID IBM Quantum, IBM T.J. Watson Research Center, Yorktown Heights, NY, USA Natalie Parham ORCID Columbia University, USA Minh Tran ORCID IBM Quantum, IBM T.J. Watson Research Center, Yorktown Heights, NY, USA
Abstract

Verifying that a quantum circuit correctly implements a desired transformation is essential for validating quantum algorithms. We consider the closely related identity check problem: given a quantum circuit U, estimate the diamond-norm distance between U and the identity channel. Ji and Wu showed that estimating this distance to within an additive 1/poly error is QMA-hard, even when U is constant-depth and 1D local – ruling out efficient algorithms in this regime.

We show that this hardness barrier disappears if one seeks a constant multiplicative-approximation instead. We present a classical algorithm that, for shallow geometrically local D-dimensional circuits, approximates the distance to the identity within a factor α=D+1, provided that the circuit is sufficiently close to the identity. The runtime of the algorithm scales linearly with the number of qubits for any constant circuit depth and spatial dimension.

We also show that the operator-norm distance to the identity UI can be efficiently approximated within a factor α=5 for shallow 1D circuits and, under a certain technical condition, within a factor α=2D+3 for shallow D-dimensional circuits. A numerical implementation of the identity check algorithm is reported for 1D Trotter circuits with up to 100 qubits.

Keywords and phrases:
Quantum computing, Identity check problem, quantum circuits, classical simulation of quantum computation, shallow circuits
Funding:
Natalie Parham: NP is supported by AFOSR award FA9550-21-1-0040, NSF CAREER award CCF-2144219, and the Sloan Foundation.
Copyright and License:
[Uncaptioned image] © Sergey Bravyi, Natalie Parham, and Minh Tran; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Quantum computation theory
; Theory of computation Quantum complexity theory
Related Version:
Full Version: https://arxiv.org/pdf/2401.16525
Acknowledgements:
SB thanks Steven Flammia and Kristan Temme for helpful discussions. MCT thanks Kunal Sharma for helpful discussions. This work was partially completed while NP was interning at IBM Quantum.
Editor:
Shubhangi Saraf

1 Introduction

A fundamental task in the analysis of quantum algorithms and devices is to determine whether a given quantum circuit U implements the intended unitary transformation V. In practice, exact implementation is rarely possible. Common sources of errors include:

  1. 1.

    Hardware noise: Imperfect control and decoherence during execution.

  2. 2.

    Compilation error: Approximations introduced when mapping the target circuit into a device’s native gate set.

  3. 3.

    Algorithmic error: Inherent approximations in the algorithm itself. For example, Hamiltonian simulation aims to implement the time evolution eiHt of a quantum system with Hamiltonian H. A common method, Trotterization approximates this evolution by sequentially applying simpler unitary operations corresponding to terms in H, set by parameters such as the number of Trotter steps. Adjusting these parameters trades off between simulation accuracy and resource cost.

Efficiently estimating how close the implemented circuit U is to the ideal unitary V is therefore crucial both for validating quantum algorithms and for tuning algorithmic or device parameters to improve overall performance. For any unitarily invariant norm UV=UVI, so this task is equivalent to estimating the distance from UV to the identity. This latter formulation is known as the identity check problem.

Unfortunately, estimating this distance between n-qubit unitaries is computationally difficult. Rosgen and Watrous showed [11, 10] that estimating the distance between two shallow (with depth logarithmic in n) quantum circuits allowing mixed states is PSPACE-hard. This essentially rules out efficient classical or quantum algorithms. Likewise, Janzing, Wocjan, and Beth established QMA-hardness of estimating the distance between two unitary circuits [5]. Ji and Wu [6] strengthened this by showing that this problem remains QMA-hard even if the circuits are constant-depth with only one-dimensional qubit connectivity. This may come as a surprise since one-dimensional shallow circuits are easy to simulate classically using Matrix Product States [17].

It is important that the no-go results stated above hold only if the distance between quantum circuits has to be estimated with a small additive error scaling inverse polynomially with the number of qubits n. Is it possible that some less stringent approximation of the distance can be computed efficiently? In this work, we show that the answer is YES and report linear-time classical algorithms approximating the diamond-norm and the operator-norm distances between constant-depth geometrically-local quantum circuits with a constant multiplicative error. Such approximation may be good enough for practical purposes. Note that an estimate of the distance with a constant multiplicative error is informative regardless of how small the distance is. For example, our algorithm can efficiently approximate the distance even if the latter is exponentially small in n. This would be impossible for an algorithm that achieves an additive error approximation scaling inverse polynomially with n.

1.1 Results

We present efficient classical algorithms for estimating the distance from a constant-depth geometrically local circuit to the identity, within a constant multiplicative error. We consider two notions of distance: the diamond norm and operator norm distance measures.

Geometrically-local circuits

We assume our circuits are D-dimensional geometrically local circuits, meaning the following: n qubits are located at cells of a D-dimensional rectangular array. The circuit is composed of single-qubit and two-qubit gates acting on nearest-neighbors cells (cells i and j are called nearest-neighbors if one can go from i to j by changing a single coordinate by ±1). A depth-h circuit consists of h layers of gates such that within each layer all gates are disjoint.

1.1.1 Diamond-norm identity check

Our main result is in terms of the diamond-norm distance [1].

Definition 1.

The diamond-norm distance between U and the identity operation is defined as

δ(U)=maxρ(UI)ρ(UI)ρ1 (1)

where 1 is the trace norm, I is the n-qubit identity, and the maximization is over all 2n-qubit states ρ.

Operationally, δ(U)/2 is the maximum total variation distance by which the output distribution of any experiment using a single call to U can change if U is replaced by the identity [1, 2].

Theorem 2 (Diamond-norm identity check algorithm).

Given the description of an n-qubit D-dimensional circuit U of depth h, our algorithm runs in time

Tn212(2hD)D (2)

and outputs a γ such that:

δ(U)γαδ(U), (3)

where

α={D+1,ifδ(U)<21.16(D+1)otherwise. (4)

In particular, the runtime is linear in n for any constant circuit depth h and spatial dimension D. We note that achieving an approximation ratio α=1+ϵ with ϵ=poly(1/n) is at least as hard as approximating the distance δ(U) with an additive error poly(1/n). The latter problem is known to be QMA-hard even in the case of constant-depth 1D circuits [6] which rules out efficient algorithms. An interesting open problem is whether an efficient classical or quantum algorithm can obtain an approximation α=1+ϵ for any constant ϵ>0. If true, this would provide a Polynomial Time Approximation Scheme [16] for the identity check problem.

1.1.2 Phase-sensitive identity check

While the diamond norm captures the worst-case distinguishability of U from the identity, it is insensitive to a global phase. In many quantum algorithms, such as Quantum Phase Estimation [9] or Krylov subspace algorithms [4, 13, 7] this phase matters since the circuit may be applied controlled on ancillary qubits. In such settings, δ(U) can be small (or even zero) while the operator-norm UI, the largest singular value of UI, can be large – for example, when U=eiφI.

This motivates a phase-sensitive version of the identity check problem where the goal is to estimate the operator-norm distance to within a constant multiplicative factor. We show that this is possible given one additional piece of information: any point t in the eigenvalue polygon PU of U, meaning the convex hull of all the eigenvalues of U (see Figure 1).

Figure 1: Eigenvalue polygon PU whose vertices are eigenvalues of U. The diamond-norm distance between U and the identity channel is δ(U)=21r2, where r is the distance between PU and the origin [1]. If PU does not contain the origin then δ(U) coincides with the diameter of PU. Otherwise, δ(U)=2.
Theorem 3 (Phase-sensitive identity check algorithm).

Given the description of an n-qubit D-dimensional circuit U of depth h, and a point tPU, our algorithm runs in time Tn212(2hD)D and outputs a γop such that

UIγopαopUI. (5)

where αop=1+2α, for the value of α stated in Theorem 2.

In many cases, efficiently computing some tPU is feasible. If one can efficiently compute Tr(ρU) for some n-qubit state ρ, then Tr(ρU)PU can serve as the point t required by our phase-sensitive algorithm. This is because the diagonal elements of ρ in the eigenbasis of U is a probability distribution, making Tr(ρU)PU a convex combination of U’s eigenvalues. Such efficient computability of Tr(ρU) holds in several natural cases:

  • 1D Shallow cirucits: If U is a 1D shallow circuit, one can choose ρ as an arbitrary product state. Since U is a Matrix Product Operator with a bond dimension 2O(h) one can compute Tr(ρU) efficiently using algorithms based on Matrix Product States [12] as long as h=O(logn). In the 1D case Eqs. (4,3) give α=2 and αop=5 while the runtime of the algorithm is Tn2O(h), see Eq. (2).

  • Certain Trotter circuits simulating local Hamiltonian time evolution: suppose U is a Trotter circuit describing time evolution of a D-dimensional Hamiltonian composed of local Pauli terms XX+YY, ZZ, and Z that preserve the Hamming weight. Then the all-zeros state |0n is a common eigenvector of each individual gate in U and one can choose ρ as the all-zeros state, that is, t=0n|U|0n. From Eqs. (4,3) one gets αop=2D+3.

In general, the above gives an efficient algorithm approximating UI within a factor αop=2D+3 for D-dimensional constant-depth circuits provided that one can efficiently find at least one point in the eigenvalue polygon PU.

1.1.3 Circuit depth – runtime tradeoffs

The exponential runtime dependence on circuit depth limits our algorithm to very shallow circuits. However, it can be extended to deeper circuits U using the divide-and-conquer strategy. Namely, if U=UU2U1 where each layer Ui has depth O(1), the triangle inequality gives

δ(U)i=1δ(Ui)i=1γi

where each γi is an upper bound on δ(Ui) computed by our algorithm. The runtime for computing this upper bound on δ(U) scales only linearly with the depth of U but we can no longer guarantee that the upper bound is tight within a constant factor. Other tradeoffs between the runtime and the upper bound tightness are discussed in Section 5.

1.2 Open questions and further directions

  1. 1.

    Improving the approximation ratio Can an efficient classical or quantum algorithm obtain a multiplicative approximation α=1+ϵ for any constant ϵ>0? If so, this would provide a Polynomial Time Approximation Scheme [16] for the identity check problem.

  2. 2.

    Non-geometrically local circuits Our algorithm scales double-exponentially with the spatial dimension D. Is it possible to remove the dependence on D so that the problem can be efficiently solved for non-geometrically local circuits?

  3. 3.

    Additive constant error Ji and Wu show that for constant-depth 1D circuits, solving the identity check problem to within 1/poly(n) additive error is QMA-hard [6]. Is it possible to estimate this efficiently up to constant additive error?

  4. 4.

    Non-unitary circuits Our algorithm only considers the case where the circuit consists of unitary gates. Furthermore, one could also ask what is the distance between two quantum channels.

1.3 Lower bounds on the distance to the identity

Although this work primarily focuses on computing upper bounds on the distance to the identity, as required for validation of quantum algorithms, efficiently computable lower bounds on the distance are also of interest. Density Matrix Renormalization Group (DMRG) algorithms [12] provide a powerful tool for computing lower bounds on the distance δ(U) or UI for 1D shallow circuits U. Indeed, one can easily check that the squared distance UI2 coincides with the largest eigenvalue of a Hamiltonian H=2IUU. If U is a depth-h 1D circuit then H is a Matrix Product Operator (MPO) with a bond dimension 2O(h). In practice, extremal eigenvalues of MPO Hamiltonians with a small bond dimension can be well approximated using DMRG algorithms [12]. However, since DMRG is a variational algorithm, it only provides a lower bound on the distance UI. To lower bound the diamond-norm distance we use a bound

δ(U)UUII,

with the equality if δ(U)<2, see Section 2. Thus δ(U)2 is lower bounded by the maximum eigenvalue of an MPO Hamiltonian H=2IIUUUU which can in turn be lower bounded using DMRG algorithm. We leave the study of lower bounds based on DMRG algorithms for a future work.

1.4 Paper organization

The rest of the paper is organized as follows. Section 2 describes bounds on the diamond-norm and operator-norm distances δ(U) and UI that can be expressed in terms of commutators between U and certain observables. This section also sketches main ideas behind our algorithm. Section 3 collects some basic facts about shallow quantum circuits and D-dimensional partitions. Section 4 proves a technical lemma which relates the norms of global and local commutators. Our identity check algorithm and its analysis is presented in Section 5. Finally, Section 6 reports a software implementation of our algorithm.

2 Commutator-based bounds

Our identity check algorithm borrows many ideas from the recent breakthrough work by Huang, Liu, et al. [3] on learning shallow quantum circuits. The main ingredients of our algorithm, described below, are bounds on the diamond-norm distance δ(U) that depend on the norm of commutators between U and certain observables composed of SWAP gates. These bounds and their proof are largely based on Ref. [3].

Consider 2n qubits labeled by integers 1,,2n. Let Wi be the SWAP gate applied to qubits i and i+n. Given a subset A[n], define a 2n-qubit operator

WA=iAWi.

By definition, WA acts non-trivially on 2|A| qubits.

Lemma 4.

Let [n]=A1Am be a partition of n qubits into m disjoint subsets and U be a unitary operator acting on n qubits. Define a quantity

γ=j=1mWAj(UI)WAj(UI)II. (6)

Then

δ(U)γmδ(U) (7)

assuming that δ(U)<2 and

δ(U)1.16γ1.16mδ(U) (8)

in the general case.

The quantity γ defined in Eq. (6) or its rescaled version 1.16γ will be the desired estimator of the distance δ(U). In the next section we show how to choose a partition [n]=A1Am with m=D+1 parts such that each subset Aj is a union of well-separated hypercubes of linear size O(hD) and all commutators WAj(UI)WAj(UI) that appear in Eq. (6) are tensor products of local commutators supported on individual hypercubes. Our construction is based on Ref. [19] which introduced so-called reclusive partitions of the D-dimensional Euclidean space. The key ingredient of our algorithm is an additivity lemma stated in Section 4. This lemma expresses the norm of commutators WAj(UI)WAj(UI)II in terms of the norm of analogous local commutators supported on individual hypercubes. Each local commutator acts on a subset of at most O(hD)D qubits and its eigenvalues can be computed by the exact diagonalization. The additivity lemma then provides a linear time algorithm for computing the norm of global commutators WAj(UI)WAj(UI)II which is all we need to compute the estimator γ defined in Lemma 4.

The next lemma shows that estimation of the operator-norm distance can be reduced to estimation of diamond-norm distance given any point in the eigenvalue polygon of U.

Lemma 5.

Let tPU be any point in the eigenvalue polygon of U and α,γ be real numbers such that δ(U)γαδ(U). Then

γop=γ+|t1|

obeys

UIγop(1+2α)UI.

In the rest of this section we prove Lemma 4 and 5.

Proof of Lemma 4.

Consider first the case δ(U)<2. We claim that in this case

δ(U)=UUII. (9)

Indeed, since δ(U)<2, the eigenvalue polygon PU does not contain the origin and thus δ(U) coincides with the diameter of PU, see Fig. 1. Let {eiφa}a be eigenvalues of U. By definition, PU is the convex hull of points {eiφa}a. Hence the diameter of PU coincides with the maximum distance between eigenvalues of U. This shows that

δ(U) =diam(PU)=maxa,b|eiφaeiφb|
=maxa,b|ei(φaφb)1|
=UUII.

To get the last equality we noted that {ei(φaφb)1}a,b is the set of eigenvalues of UUII.

Let us agree that the tensor product in Eq. (9) separates two n-qubit registers that span qubits {1,,n} and {n+1,,2n}. Let W=i=1nWi be an operator that swaps the two registers. Since the operator norm is unitarily invariant, Eq. (9) gives

δ(U) =(UUII)W
=(UI)W(UI)W. (10)

Here we noted that (IU)W=W(UI). The triangle inequality implies that for any unitary operators Pj,Qj one has

P1P2PmQ1Q2Qmj=1mPjQj. (11)

Choosing Pj=(UI)WAj(UI), Qj=WAj, and noting that W=j=1mWAj one arrives at

δ(U)j=1m(UI)WAj(UI)WAj=γ. (12)

The last equality uses the fact that WAj are both hermitian and unitary, which implies OWAj=WAjOI for any operator O. The dual characterization of the diamond-norm [18] gives

δ(U)=maxV:V1(UI)V(UI)V (13)

where the maximization is over 2n-qubit operators V. Since WAj=1 one infers that

(UI)WAj(UI)WAjδ(U)

for all j and thus γmδ(U). This concludes the proof in the case δ(U)<2.

Suppose now that δ(U)=2. Then the eigenvalue polygon PU contains the origin, see Fig. 1. Let {eiφa}a be the eigenvalues of U. We claim that there exist eigenvalues eiφ0,eiφ1 of U such that the shortest arc length between them is at least 2π/3. Otherwise, all eigenvalues would lie within an arc of length 2π/3, 1/3 of the unit circle – but this would imply that PU does not contain the origin. Thus

UUII =maxa,b|ei(φaφb)1| (14)
|ei(φ0φ1)1| (15)
|ei2π/31| (16)
=2sin(π/3)=3. (17)

Therefore we have

γUUII3 (18)

so

23γ2=δ(U). (19)

Furthermore, our proof of the upper bound γmδ(U) is unchanged when δ(U)=2. The desired bound, Eq. (8) follows since 1.1623.

Proof of Lemma 5.

Let {eiφa}a be eigenvalues of U and t=apaeiφa, where pa0 and apa=1. We have

UI =UtI+tII
|t1|+apa(UeiφaI)
|t1|+apaUeiφaI
|t1|+maxaUeiφaI
=|t1|+maxa,b|eiφaeiφb|
|t1|+δ(U)|t1|+γ.

Conversely, it is well known [1] that δ(U)2UI for any untary U. Thus

|t1|+γ =|apa(eiφa1)|+γ
apa|eiφa1|+αδ(U)
maxa|eiφa1|+2αUI
=(1+2α)UI.

3 Lightcones and reclusive partitions

Given a quantum circuit U acting on n qubits, the lightcone (j) of a qubit j[n] is defined as the set of all output qubits i[n] that can be reached by moving through the circuit diagram forward in time starting from the input qubit j. For example, if U is a one-dimensional circuit of depth h then

(j)[jh,j+h]. (20)

For any subset of qubits S[n] let (S) be the lightcone of S defined as

(S)=jS(j). (21)

We say that a subset of qubits S is the support of an operator O and write S=supp(O) if O acts trivially on all qubits jS. By definition,

supp(UOU)(supp(O)) (22)

for any operator O. Furthermore, UOU=UlocOUloc, where Uloc is a “localized” circuit obtained from U by removing all gates acting on qubits outside of the lightcone (supp(O)).

Two subsets of qubits S1 and S2 are said to be lightcone separated if (S1)(S2)=. If O1 and O2 are operators supported on S1 and S2 then UO1O2U is a product of operators UO1U and UO2U with disjoint supports.

Figure 2: Examples of reclusive partitions for D=1,2. Qubits are located at cells of a D-dimensional rectangular array. The array is partitioned into D+1 sets A1,,AD+1 such that each set Aj is a disjoint union of D-dimensional cubes of linear size L and the distance between any pair of cubes from the same set Aj is at least L/D. Here L=4. Cubes located near the boundary of the array are truncated. The sets A1,A2,A3 are highlighted in yellow, green, and blue.

Suppose now that n qubits are located at cells of a D-dimensional rectangular array. We shall consider partitions of the array into D-dimensional cubes known as reclusive partitions [19]. The linear size of each cube in the partition will be chosen as

L=2Dh, (23)

where h is the depth of U.

Lemma 6 (Reclusive Partitions [19]).

One can partition cells of a D-dimensional rectangular array into D+1 sets A1,,AD+1 such that each set Aj is a disjoint union of D-dimensional cubes of linear size L and the distance between any pair of cubes from the same set Aj is at least L/D. The above partition can be constructed efficiently.

Figure 2 shows examples of 1D and 2D reclusive partitions, see Ref. [19] for the 3D example. We defer the proof of Lemma 6 to Appendix A since it is a simple rephrasing of the results established in [19]. By construction, each cube in the partition contains at most LD qubits (cubes located near the boundary of the array may be truncated) and any pair of cubes from the same set Aj is lightcone separated due to Eq. (23). Write

Aj=Aj,1Aj,2Aj,j,

where j is the number of cubes in Aj and Aj,p denotes the p-th cube in Aj. By constriction, we have

(Aj,p)(Aj,q)=for all pq. (24)

Since the lightcone of a cube with a linear size L can be enclosed by a cube of linear size L+2h, the number of qubits contained in any lightcone (Aj,p) is bounded as

|(Aj,p)|(2h(D+1))D. (25)

Here we used Eq. (23).

Consider the diamond-norm distance δ(U) and specialize the commutator-based bound of Lemma 4 to the reclusive partition [n]=A1AD+1. By definition,

WAj=p=1jWAj,p.

Lightcone separation of cubes Aj,p implies that operators (UI)WAj,p(UI) acts on pairwise disjoint subsets of qubits. Thus

WAj(UI)WAj(UI)=p=1jKj,p, (26)

where we defined commutators

Kj,p=WAj,p(UI)WAj,p(UI).

The above shows that Kj,p are operators acting on pairwise disjoint subsets of qubits (for a fixed j). Let Uj,p be a “localized” circuit obtained from U by replacing all gates acting on at least one qubit outside of the lightcone (Aj,p) with the identity. Then Uj,p acts non-trivially only on the lightcone (Aj,p) and

Kj,p=WAj,p(Uj,pI)WAj,p(Uj,pI).

The support of Kj,p includes all qubits in the left n-qubit register contained in (Aj,p) as well as all qubits in the right n-qubit register contained in Aj,p. Thus

|supp(Kj,p)| |(Aj,p)|+|Aj,p|
(2h(D+1))D+(2hD)D
=(2hD)D[(1+1/D)D+1]4(2hD)D.

Eigenvalues of a unitary operator acting on m qubits can be computed in time O(23m) by the exact diagonalization of a unitary 2m×2m matrix. Thus one can compute all eigenvalues of the commutator Kj,p in time

T212(2hD)D.

In the next section we show that the norm

WAj(UI)WAj(UI)II=p=1jKj,pII

that appears in the bound of Lemma 4 is a simple function of eigenvalues of individual commutators Kj,p.

4 Additivity lemma

In this section we show how to compute the norm of commutators that appear in Lemma 4. First, let us introduce some terminology. Let S1={z:|z|=1} be the unit circle. If U is a unitary operator, let 𝖾𝗂𝗀(U)S1 be the set of eigenvalues of U (ignoring multiplicities). Consider 2n qubits, a subset A[n], and a SWAP operator WA=iAWi where Wi is the SWAP gate acting on qubits i and i+n. Consider a commutator

KA=WA(UI)WA(UI).

We claim that 𝖾𝗂𝗀(KA)=𝖾𝗂𝗀(KA). Indeed, KA=WAKAWA. Since WA is both unitary and hermitian, conjugation by WA does not change the eigenvalue spectrum. Thus eigenvalues of KA have a form e±iφ with 0φπ. For each φ one can choose both positive and negative sign in the exponent. Define a function θ that maps subsets of qubits A[n] to real numbers in the interval [0,π] such that

θ(A)=maxφ[0,π]φsubject toeiφ𝖾𝗂𝗀(KA). (27)

Note that eiθ(A) is the unique eigenvalue of KA with the maximum distance from 1 and a non-negative imaginary part. Accordingly,

KAI=|eiθ(A)1|. (28)

We shall need the following simple fact.

Lemma 7.

If θ(A)π/2 for some subset A[n] then δ(U)2.

Proof.

From θ(A)π/2 one infers that KA has an eigenvalue with a non-positive real part. Since all points on the unit circle within distance less than 2 from 1 have a positive real part, one gets KAI2. The dual characterization of the diamond norm [18] gives

δ(U) =maxη:η1(UI)η(UI)η
(UI)WA(UI)WA=KAI2.

Definition 8.

A subset A[n] is called good if θ(A)<π/2. Otherwise A is called bad.

The following lemma shows that the function θ(A) is additive under the union of lightcone-separated subsets, provided that the circuit U is sufficiently close to the identity.

Lemma 9 (Additivity).

Suppose A1,A2[n] are good lightcone-separated subsets. Consider two cases:

  1. (a)

    θ(A1)+θ(A2)<π/2,

  2. (b)

    θ(A1)+θ(A2)π/2.

Case (a) implies that the union A1A2 is good and

θ(A1A2)=θ(A1)+θ(A2). (29)

Case (b) implies that δ(U)2.

Proof.

Define commutators

Kp=WAp(UI)WAp(UI)

with p{1,2}. Since A1 and A2 have lightcone separated, K1 and K2 act on disjoint subsets of qubits and thus

K12WA1A2(UI)WA1A2(UI)=K1K2

has the same eigenvalues as the tensor product of K1 and K2. In other words,

𝖾𝗂𝗀(K1K2)={z1z2:z1𝖾𝗂𝗀(K1)andz2𝖾𝗂𝗀(K2)}.

By definition, eiθ(Ap)𝖾𝗂𝗀(Kp) for p=1,2. Thus eiθ(A1)+iθ(A2)𝖾𝗂𝗀(K1K2)=𝖾𝗂𝗀(K12).

Consider case (a). Let eiφp𝖾𝗂𝗀(Kp) be eigenvalues such that eiθ(A1A2)=ei(φ1+φ2). Then

θ(A1A2)=φ1+φ2+2πk (30)

for some integer k chosen such that θ(σ1σ2)[0,π]. By definition, |φp|θ(Ap) and thus

|φ1|+|φ2|θ(A1)+θ(A2)<π2.

Hence the only integer k in Eq. (30) satisfying θ(A1A2)[0,π] is k=0, that is, θ(A1A2)=φ1+φ2θ(A1)+θ(A2). Conversely, since eiθ(A1)+iθ(A2) is an eigenvalue of K12 and θ(A1)+θ(A2)<π/2, one infers that θ(A1A2)θ(A1)+θ(A2). This proves Eq. (29).

Consider case (b). The same arguments as above show that K12 has an eigenvalue eiφ, where φ=θ(A1)+θ(A2)[π/2,π). Here we used the assumption that both A1 and A2 are good, as well as the bound θ(A1)+θ(A2)π/2. Hence θ(A1A2)π/2 and δ(U)2 by Lemma 7. By inductive application of the additivity lemma one obtains the following.

Corollary 10.

Suppose A1,,A[n] are lightcone separated subsets. Let A=p=1Ap be their union and

φ=p=1θ(Ap). (31)

Here the angles are added as real numbers (rather than modulo 2π). If φ<π/2 then

WA(UI)WA(UI)I=|eiφ1|. (32)

If φπ/2 then δ(U)2.

5 Identity check algorithm

Combining all above ingredients we arrive at the following algorithm for the D-dimensional identity check problem. We first consider the case when the input circuit U is sufficiently close to the identity such that δ(U)<2. Below we assume that a reclusive partition [n]=A1AD+1 of the D-dimensional qubit array has been already computed, see Appendix A for details. We claim that the following algorithm outputs an estimator γ satisfying δ(U)γ(D+1)δ(U).

Algorithm 1 Identity check (diamond-norm).

Input: An n-qubit D-dimensional circuit U with δ(U)<2.
Output: γ satisfying δ(U)γ(D+1)δ(U).

Indeed, if line 9 is never reached, Corollary 10 of the additivity lemma imply that the output of the algorithm coincides with the quantity γ defined in Lemma 4 specialized to the reclusive partition. In this case correctness of the algorithm follows directly from Lemma 4. Otherwise, the algorithm outputs γ=2, while Corollary 10 implies that δ(U)2. In this case γ=2 satisfies the bounds δ(U)γ(D+1)δ(U) for D1. We claim that the algorithm runs in time O(n212(2hD)D). Indeed, the total number of cubes Aj,p is O(n). Computing the function θ(Aj,p) at line 7 requires eigenvalues of a unitary operator KAj,p acting on at most 4(2hD)D qubits, as discussed in Section 3. This computation takes time O(212(2hD)D). Hence the total runtime is O(n212(2hD)D).

Next consider the general case when it is possible that δ(U)=2. Define our estimator of δ(U) as 1.16γ, where γ is the output of Algorithm 1. We claim that

δ(U)1.16γ1.16(D+1)δ(U). (33)

If the algorithm never reaches line 9 then its output coincides with the quantity γ defined in Lemma 4 and Eq. (33) follows directly from Lemma 4, see Eq. (7). Otherwise, if the algorithm reaches line 9, it outputs γ=2 while δ(U)2 due to Corollary 10 of the additivity lemma. In this case the first inequality in Eq. (33) follows from δ(U)2 and the second inequality becomes 2(D+1)δ(U) which is true for any D1 since δ(U)2. The runtime analysis is the same as before.

Since the runtime scales exponentially with the size of cubes Aj,p, one may wish to choose a partition with smaller cubes even if this negatively impacts the approximation quality. As an extreme case, one can choose each cube Aj,p as a single qubit. However ensuring the lightcone separation between cubes in the same subset Aj would require (4h+1)D subsets Aj instead of D+1 subsets 111Since any qubit is lightcone separated from all but at most (1+4h)D other qubits, Vizing’s theorem implies that qubits can be partitioned into at most 1+(1+4h)D lightcone separated subsets.. Accordingly, the approximation ratio would become α=Ω((4h+1)D) instead of α=D+1.

Likewise, we expect that the runtime can be improved at the cost of a worse approximation ratio α by computing the norm of commutators KAj,pI using a randomized version of the power method [8]. It is known that this method can approximate the operator norm of a matrix of size 2m×2m with a multiplicative error 1+ϵ using O(m/ϵ) matrix-vector multiplications [8]. In our case, KAj,p is specified by a quantum circuit acting on m=4(2hD)D qubits with poly(m) gates, see Section 3. Thus one can implement matrix-vector multiplication for the matrix KAj,pI in time poly(m)2m. Accordingly, the power method runs in time poly(m)2m/ϵ, whereas the exact diagonalization of KAj,pI requires time Ω(23m).

6 Numerical experiments

In this section, we implement the algorithm described in Section 5 to approximate the distance between identity and a constant-depth circuit U of up to 100 qubits. We consider U=U1U2, where U1,U2 are two different unitaries that both approximate the time evolution eiHτ of n qubits under the one-dimensional XY model:

H=j=1n1(XjXj+1+YjYj+1).

In the limit of small τ, U=U1U2I approximate a forward evolution followed by a backward evolution under the same Hamiltonian. Explicitly, U1 and U2 are the first-order Trotter approximations with, respectively, an odd-even ordering and an X-Y ordering:

U1 =eiτodd j(XjXj+1+YjYj+1)eiτeven j(XjXj+1+YjYj+1),
U2 =eiτjXjXj+1eiτjYjYj+1.

We note that XjXj+1 and YjYj+1 are both antisymmetric under the unitary conjugation by the staggered Pauli string X1Y2X3Y4. Therefore, the eigenvalues of U comes in complex conjugate pairs which results in a simple relationship between the diamond-norm and the operator-norm distances. Namely, a simple algebra shows that δ(U)=2sin(φ), where φ[0,π/2) is defined by UI=|eiφ1|. In addition, using a well-known mapping from the XY model to free fermions [15], we can compute this distance exactly, providing a benchmark for our algorithm.

Figure 3: A comparison between the exact diamond-norm distance δ(U) (green dots) computed by a mapping to free fermions, an upper bound γ computed by Algorithm 1 (blue dots) and the lower bound γ/2 (orange dots). Both bounds closely capture the exact distance between U and I, demonstrating the scalability of our algorithm.

In Fig. 3, we compare the exact distance δ(U) against the bounds presented in Lemma 4 for up to 100 qubits at τ=0.01. For the one-dimensional qubit array, the bounds simplify to δ(U)γ2δ(U), where

γ=j=12WAj(UI)WAj(UI)I. (34)

Here, A1 and A2 are the qubit partitions illustrated in Fig. 2 with L=4. The lightcone separated construction of Aj and the additivity lemma allow us to efficiently compute the commutator WAj(UI)WAj(UI)I for each j. In particular, computing the bounds reduces to finding eigenvalues of operators that are each supported on at most 12 qubits. Additionally, due to the translational invariance of the unitary U, only O(1) such operators are unique, making the complexity of our algorithm independent of the system size.

Both bounds correctly capture the linear dependence of the Trotter error on the system size n, with the upper bound γ approaching the exact δ(U) in the limit of large n. We note that UI and, thus, δ(U) can also be estimated by finding the maximum eigenvalue of the Hamiltionian HU(UI)(UI). Writing this Hamiltonian as a matrix product operator on a one-dimensional lattice, one can efficiently find a lower bound to its maximum eigenvalue using an algorithm based on the density matrix renormalization group (DMRG). While DMRG does not have a performance guarantee, we find that it produces lower bounds to within 3×107 of the exact δ(U) in this example, providing a complementary approach to our algorithm in one dimension. DRMG simulations were performed using the matrix product representation library for Python 𝗆𝗉𝗇𝗎𝗆 [14] with MPS bond dimension χ=20 and two DMRG sweeps in 𝗆𝗉𝗇𝗎𝗆.𝗅𝗂𝗇𝖺𝗅𝗀.𝖾𝗂𝗀.

References

  • [1] Dorit Aharonov, Alexei Kitaev, and Noam Nisan. Quantum circuits with mixed states. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 20–30, 1998. doi:10.1145/276698.276708.
  • [2] Avraham Ben-Aroya and Amnon Ta-Shma. On the complexity of approximating the diamond norm. arXiv preprint arXiv:0902.3397, 2009.
  • [3] Hsin-Yuan Huang, Yunchao Liu, Michael Broughton, Isaac Kim, Anurag Anshu, Zeph Landau, and Jarrod R McClean. Learning shallow quantum circuits. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, pages 1343–1351, 2024. doi:10.1145/3618260.3649722.
  • [4] William J Huggins, Joonho Lee, Unpil Baek, Bryan O’Gorman, and K Birgitta Whaley. A non-orthogonal variational quantum eigensolver. New Journal of Physics, 22(7):073009, 2020.
  • [5] Dominik Janzing, Pawel Wocjan, and Thomas Beth. "Non-identity-check" is QMA-complete. International Journal of Quantum Information, 3(03):463–473, 2005.
  • [6] Zhengfeng Ji and Xiaodi Wu. Non-identity check remains QMA-complete for short circuits. arXiv preprint arXiv:0906.5416, 2009.
  • [7] William Kirby, Mario Motta, and Antonio Mezzacapo. Exact and efficient lanczos method on a quantum computer. Quantum, 7:1018, 2023. doi:10.22331/Q-2023-05-23-1018.
  • [8] Jacek Kuczyński and Henryk Woźniakowski. Estimating the largest eigenvalue by the power and Lanczos algorithms with a random start. SIAM journal on matrix analysis and applications, 13(4):1094–1122, 1992. doi:10.1137/0613066.
  • [9] Michael A Nielsen and Isaac L Chuang. Quantum computation and quantum information. Cambridge university press, 2010.
  • [10] Bill Rosgen. Distinguishing short quantum computations. arXiv preprint arXiv:0712.2595, 2007. arXiv:0712.2595.
  • [11] Bill Rosgen and John Watrous. On the hardness of distinguishing mixed-state quantum computations. In 20th Annual IEEE Conference on Computational Complexity (CCC’05), pages 344–354. IEEE, 2005.
  • [12] Ulrich Schollwöck. The density-matrix renormalization group in the age of matrix product states. Annals of physics, 326(1):96–192, 2011.
  • [13] Kazuhiro Seki and Seiji Yunoki. Quantum power method by a superposition of time-evolved states. PRX Quantum, 2(1):010333, 2021.
  • [14] Daniel Suess and Milan Holzäpfel. mpnum: A matrix product representation library for Python. Journal of Open Source Software, 2(20):465, 2017. doi:10.21105/JOSS.00465.
  • [15] Barbara M Terhal and David P DiVincenzo. Classical simulation of noninteracting-fermion quantum circuits. Physical Review A, 65(3):032325, 2002.
  • [16] Vijay V Vazirani. Approximation algorithms, volume 1. Springer, 2001.
  • [17] Guifré Vidal. Efficient simulation of one-dimensional quantum many-body systems. Physical review letters, 93(4):040502, 2004.
  • [18] John Watrous. Semidefinite programs for completely bounded norms. arXiv preprint arXiv:0901.4709, 2009.
  • [19] Jason Vander Woude, Peter Dixon, A Pavan, Jamie Radcliffe, and NV Vinodchandran. Geometry of rounding. arXiv preprint arXiv:2211.02694, 2022.

Appendix A Proof of Lemma 6

Let A be an upper triangular D×D matrix with the unit diagonal. In other words, Ai,i=1 for all i and Ai,j=0 for all i>j. Define a lattice AD formed by linear combinations of columns of A with integer coefficients. By definition, pA iff p=Ac for some integer vector cD. For each lattice point pA define an open cube C(p) and a closed cube C¯(p) such that p is the cube’s corner with the smallest coordinates, that is,

C(p)=p+(0,1)DandC¯(p)=p+[0,1]D.

The following claim can be interpreted as saying that the cubes C(p) form a partition of the Euclidean space D if one ignores cube’s boundaries.

Claim 11.

Any point xD is contained in at most one open cube C(p). Any point xD is contained in at least one closed cube C¯(p).

Proof.

Define norm of a vector xD as

x=maxi=1,,D|xi|.

Suppose xD is contained in cubes C(p) and C(q) for some lattice points p,q. We have to show that p=q. Clearly, cubes C(p) and C(q) overlap iff

pq<1. (35)

Thus we need to show that Eq. (35) implies p=q. Write

r=pq=Ac (36)

for some cD. Using the upper triangular structure of A and the fact that A has unit diagonal one gets

ri=ci+j=i+1DAi,jcj. (37)

If i=D then clearly ri=ci and thus |ri|<1 is only possible if ci=0. If i=D1 then ri=ci+Ai,DcD. However, we have already showed that cD=0. Thus ri=ci and |ri|<1 is only possible if ci=0. Applying the same argument inductively proves that c is the all-zeros vector, that is, Eq. (35) implies p=q.

Suppose some vector xD is not contained in any closed cube C¯(p). Then xp>1 for all lattice points p. Let us show that this assumption leads to a contradiction. Indeed, set i=D. Shift x by an integer linear combination of the i-th column of A to make |xi|1. This is possible since Ai,i=1. Next set i=D1. Shift x by an integer linear combination of the i-th column of A to make |xi|1 and |xi+1|1. This is possible since Ai,i=1 and Ai+1,i=0. Applying the same argument inductively shows that shifting x by lattice points one can make x1. Hence x is contained in the cube C¯(0D). Equivalently, the original vector x is contained in some cube C¯(p).

Following Ref. [19] we choose

Ai,j={1ifi=j,Dj+1Difi<j,0else (38)

for 1i,jD. For example,

A=[11/201]andA=[12/31/3011/3001]

in the case D=2 and D=3 respectively. Below we summarize properties of the corresponding lattice A established in [19].

Fact 12 (Lemmas 7.15 and 7.19 of [19]).

The -distance between closed cubes C¯(p) and C¯(q) is either 0 (if these cubes overlap) or at least 1/D (if these cubes do not overlap). Here p,qA are arbitrary lattice points.

Fact 13 (Theorem 7.16 of [19]).

The cubes {C¯(p)}pA can be colored with D+1 colors such that any cube C¯(p) overlaps only with cubes C¯(q) of a different color.

As a consequence of Facts 1 and 2, the -distance between any pair of cubes C¯(p) of the same color is at least 1/D. Rescaling each cube by the factor L=2Dh and noting that LA is an integer matrix one obtains a partition of D into a disjoin union of D-dimensional cubes LC¯(p) of linear size L such that corners of each cube have integer coordinates, the cubes are colored with D+1 colors, and the -distance between any pair of cubes of the same color is at least L/D.

Finally, embed a D-dimensional rectangular array into D such that each cell of the array is a translation of the cube (0,1)D by an integer vector. We can now define the desired set of cells Aj as the union of all cells contained in the rescaled cubes LC¯(p) of the j-th color. This concludes the proof of Lemma 6.