May 25, 2026
Commuting Hamiltonians lie at the boundary between classical constraint satisfaction and quantum many-body physics, exhibiting rich quantum structure while remaining more tractable than general noncommuting models. In contrast, physical Hamiltonians are rarely exactly commuting, which naturally motivates the study of almost commuting Hamiltonians. Despite their relevance, the implications of approximate commutation are only poorly understood.
In this work, we show how to efficiently approximate any almost commuting \(2\)-local qubit Hamiltonian by a commuting one: we give a locality-preserving algorithmic rounding technique that maps any \(2\)-local Hamiltonian \(H=\sum_{i=1}^m h_i\) with \(\|[h_i,h_j]\| \leq \varepsilon\) to a nearby Hamiltonian \(\hat{H}\) whose terms pair-wise commute, and which is within overall distance \(\|H-\hat{H}\| = O(m\,\varepsilon^{1/6})\).
As a consequence, we show that \(\delta\)-approximations to the ground energy for \(\varepsilon\)-almost commuting \(2\)-local qubit Hamiltonians lie in \(\mathsf{NP}\) when \(\delta \gg m\varepsilon^{1/6}\), extending the classical containment well beyond the commuting setting. Finally, we present two applications of our rounding framework: Gibbs sampling and fast Hamiltonian simulation for almost commuting systems.
Commuting local Hamiltonians have been studied [1]–[6] across condensed matter physics, quantum information theory, and computational complexity. From the perspective of constraint satisfaction, commuting local Hamiltonians sit at a boundary between classical and quantum problems. When all local terms commute, the ground-state problem reduces to the simultaneous satisfaction of a family of local constraints [1], analogous to a classical constraint satisfaction problem (CSP). Indeed, many commuting Hamiltonians admit ground states that can be described efficiently in classical terms, such as product states, stabilizer states, or tensor network states of bounded bond dimension [7]. The computational complexity of commuting Hamiltonians is thus significantly more tractable than that of general noncommuting models, with many cases lying in the classical complexity class \(\mathsf{NP}\) [1], [5], [6]. In condensed matter physics, commuting Hamiltonians serve as exactly solvable models that capture the essential structure of entire phases of matter. Prominent examples include stabilizer Hamiltonians for quantum error-correcting codes (e.g., the toric code [8]), commuting-projector models for topological order [9], and fracton models with constrained dynamics [10].
Formally, the \(k\)-local commuting Hamiltonian problem consists of Hamiltonians of the form \[\begin{align} H=\sum_{i=1}^m h_i \quad \text{ such that } \quad [h_i,h_j]=0, \quad\quad \forall i,j=1,\dots,m \, \end{align}\] where all of the terms pair-wise commute4 and each term is of unit norm \(\|h_i\|\leq 1\) acting on at most \(k\) qubits. Commuting Hamiltonians retain intrinsically quantum features that sharply distinguish them from classical CSPs: although all of the Hamiltonian terms \(\{h_i\}_{i=1}^m\) can be simultaneously diagonalized, the common eigenbasis may not be a product basis, and the ground states may exhibit long-range entanglement and topological order, such as the toric code [8]. From a complexity-theoretic perspective, this places commuting Hamiltonians in an intermediate regime between classical satisfiability and fully quantum local Hamiltonians, providing a test ground for difficult problems such as the quantum PCP conjecture [2], [11], the NLTS conjecture [12], Gibbs state preparation [13] and fast thermalization [14].
Despite their utility, commuting Hamiltonians represent a highly nongeneric limit. Physical systems are rarely exactly commuting, and even infinitesimal noncommuting perturbations can produce dramatic qualitative changes. This motivates the study of almost commuting Hamiltonians, in which local terms fail to commute but only do so weakly; for example, when the Hamiltonian terms pair-wise "\(\varepsilon\)-almost commute" such that \[\begin{align} \|[h_i,h_j]\| \leq \varepsilon, \quad\quad \forall i,j=1,\dots,m. \end{align}\] Such Hamiltonians capture a much richer range of physical phenomena, including entanglement generation, slow dynamics, and emergent conservation laws [15]. Almost commuting Hamiltonians arise naturally in systems exhibiting emergent integrability, prethermalization, or many-body localization. A simple and illustrative example is the transverse-field Ising model in the weak-field regime [15], described by the \(2\)-local qubit Hamiltonian \[\begin{align} \label{eq:ising} H = -\sum_{\langle i,j \rangle} Z_i Z_j - h \sum_i X_i \, , \end{align}\tag{1}\] with \(h \ll 1\). At \(h=0\), the Hamiltonian consists of exactly commuting terms and reduces to a classical Ising model with product-state ground states. Turning on a weak transverse field introduces local noncommuting terms whose pairwise commutator norms \(\|[Z_i Z_j,hX_k]\|\) scale with \(h\) whenever \(i=j\) or \(j=k\), resulting in an almost commuting Hamiltonian. Even mild noncommutativity can cause the underlying physics to change qualitatively: the ground state becomes entangled, quantum fluctuations lift degeneracies, and the system supports nontrivial correlations absent in the commuting limit [16]. This illustrates how almost commuting Hamiltonians interpolate between classical constraint satisfaction and genuinely quantum many-body behavior.
The weak transverse-field Ising model might suggest that any almost commuting Hamiltonian can always be identified as a simple perturbation of an underlying commuting model. However, this intuition can be misleading in general. While the perturbation theory [17] perspective is useful in identifying approximately commuting structure in very special or integrable models, this relies on strong assumptions—such as a known commuting parent Hamiltonian or small, easily identifiable model parameters—which may not be present in generic local Hamiltonians.
From a computational standpoint, almost commuting Hamiltonians occupy a compelling intermediate regime. At first sight, they appear no longer classically reducible; and yet they are far from fully quantum Hamiltonians. Understanding whether their ground states and low-energy properties retain some of the tractability of commuting models—or instead exhibit the full hardness of general quantum constraint satisfaction problems—remains an intriguing open question.
A naive idea for handling almost commuting systems, in general, is to simply discard Hamiltonian terms until the remainder commute; for example, one could consider the anti-commutation graph whose vertices correspond to Hamiltonian terms and whose edges connect pairs that fail to commute, and then try to find a maximum independent set (or some efficient approximation) [18]. The resulting Hamiltonian, obtained by retaining only the corresponding subset of terms, is exactly commuting by construction. However, this approach does not exploit the magnitude of the noncommutativity: its error is determined solely by how many terms are removed. In the worst case, even when all \(\varepsilon\)-almost commute for a small \(\varepsilon >0\), the procedure may discard a constant fraction of the terms, leading to a vacous approximation error that scales with \(m\) (the number of Hamiltonian terms) with no improvement as \(\varepsilon \to 0\). In contrast, a meaningful rounding procedure for almost commuting Hamiltonians should be \(\varepsilon\)-sensitive, with an error that decreases as the commutators become smaller. This suggests that an \(\varepsilon\)-sensitive rounding procedure must do more than just pruning a noncommuting interaction graph: it must exploit the algebraic structure of the Hamiltonian terms themselves.
A more sophisticated angle of attack for dealing with a set of almost commuting matrices is to explicitly find nearby commuting matrices; for example, given a pair of two matrices \[\begin{align} A,B \in \mathbb{C}^{d \times d}\quad \text{ with } \quad \|[A,B]\| \leq \varepsilon \end{align}\] one might try to "round" to \(\hat{A},\hat{B}\) such that \([\hat{A},\hat{B}]=0\) with \(\|\hat{A}-A\| \leq \delta(\varepsilon)\) and \(\|\hat{B}-B\| \leq \delta(\varepsilon)\), for some \(\delta(\varepsilon)\) such that \(\delta(\varepsilon) \rightarrow 0\) as \(\varepsilon\rightarrow 0\). The mathematical problem of rounding almost commuting matrices has a long and subtle history. For pairs of Hermitian matrices, Lin’s theorem [19] guarantees that rounding is indeed possible, and quantitative bounds on \(\delta(\varepsilon)\) were later given by Hastings [20], [21]. Surprisingly, the same is not possible for triplets of Hermitian matrices, as shown by Davidson [22] and also by Hastings and Loring [23] who gave further topological obstructions towards rounding in terms of the Bott index. These results suggest that large collections of almost commuting Hermitian matrices can, in general, not be rounded to nearby commuting matrices unless further structure is enforced, hindering a direct application to almost commuting Hamiltonians. Nevertheless, many physically relevant non-commuting local Hamiltonians are semi-classical, and may very well be close to a commuting Hamiltionian, as the weak transverse-field Ising model in 1 suggests. This raises the question:
Is it possible to round generic almost commuting Hamiltonians to nearby commuting Hamiltonians?
Progress on this question could shed new light on the extent to which weak noncommutativity is essential for the observed physics, versus merely a perturbation of an underlying commuting structure. Moreover, from a complexity perspective, it would allow us to better understand the boundary between classical satisfiability and inherently quantum optimization problems.
In this work, we overcome prior limitations on rounding approximately commuting Hermitian matrices which have so far hindered applications to many-body Hamiltonians. We develop a locality-preserving algorithmic rounding technique which allows us to simultaneously round large collections of almost commuting Hermitian matrices—avoiding the regimes where general no-go results apply—by exploiting the special structure of physical many-body Hamiltonians:
(Locality:) Interactions in physical many-body Hamiltonians tend to be local in the sense that they involve a constant number of particles at a time; consequently, each term in the Hamiltonian is actually a highly non-generic Hermitian operator: it only acts non-trivially on a few sub-systems at a time and is equal to the identity everywhere else.
(Dimensionality:) Many-body Hamiltonians tend to involve particles whose Hilbert space carries a fixed local dimension. In the case of two-level qubit systems (or "spin systems"), such constrained dimensionality can give rise to very useful properties, such as the fact that commutation between Hermitian single-qubit operators becomes transitive: if \(A,B\) commute and \(B,C\) commute, then \(A\) and \(C\) must also commute, provided that \(B\) is not a multiple of the identity.5 In higher dimensions, this property can fail due to degenerate eigenspaces.6
Our rounding technique exploits these physical constraints, and allows us to efficiently approximate any almost commuting \(2\)-local Hamiltonian by a nearby commuting one, while preserving locality. This is captured by our main result, which we informally state below.
informaltheoremInformalTheoremOne Let \(H=\sum_{i=1}^m h_i\) be an \(\varepsilon\)-almost commuting \(2\)-local Hamiltonian on \(n\) qubits. Then, there exists a deterministic classical algorithm that, given as input a description of \(H\), runs in linear time and outputs a nearby commuting 2-local Hamiltonian \(\hat{H}=\sum_{i=1}^m \hat{h}_i\) such that \(\|h_i - \hat{h}_i\| \leq O(\varepsilon^{1/6})\), for all \(i \in [m]\), and which is within overall distance \(\|\hat{H} - H\| \leq O(m \,\varepsilon^{1/6})\).
To the best of our knowledge, this yields the first algorithmic rounding technique for almost commuting \(2\)-local qubit Hamiltonians which produces an explicit, quantitative error bound that vanishes as \(\varepsilon \rightarrow 0\), unlike naive methods that fail to take the magnitude of the noncommutativity into account 7. As a direct consequence of our rounding result, we show the following:
informaltheoremInformalContainment The \(\varepsilon\)-almost commuting \(2\)-local qubit Hamiltonian problem with \(m\) terms and energy promise gap8 \(\delta\) is contained in \(\NP\) when \(\delta \gg m \varepsilon^{1/6}\).
This extends the classical \(\mathsf{NP}\) containment result of Bravyi and Vyalyi [1] well beyond the commuting setting. In addition, the above theorem also implies a new no-go result in the context of quantum PCPs [2], [11] akin to [24]. Specifically, it suggests that any qPCP-hard family of \(2\)-local qubit Hamiltonians must exhibit some moderate amount of noncommutativity: assuming \(\mathsf{NP} \neq \mathsf{QMA}\), any family of \(2\)-local qubit Hamiltonians for which the \(\gamma\)-LH problem is \(\QMA\)-hard for constant \(\gamma\) must allow for pairwise commutator norms of \(\omega(\frac{1}{m^6})\).
More broadly, this places almost commuting Hamiltonians in an intermediate regime between classical constraint satisfaction and fully quantum optimization. It shows that, at least for \(2\)-local qubit systems, the onset of \(\mathsf{QMA}\)-hardness requires a quantitatively meaningful departure from the algebraic structure of commuting models, thereby linking a complexity-theoretic transition to a concrete operator-algebraic measure of noncommutativity.
As an application of our rounding technique for almost commuting quantum many-body systems, we present two algorithmic applications; the first one in the context of quantum Gibbs sampling and the second in the context of Hamiltonian simulation.
The Gibbs ensemble connects microscopic descriptions of physical systems with their macroscopic thermodynamic behavior, allowing one to compute quantities such as free energies, effective partition functions, and equilibrium expectation values [15], [25]–[32]. Given a local Hamiltonian \(H\) and an inverse temperature \(\beta > 0\), the Gibbs state is given by the density operator \[\begin{align} \label{eq:gibbs-ex} \rho_\beta(H) = \frac{e^{-\beta H}}{\mathrm{Tr}\left[e^{-\beta H}\right]}. \end{align}\tag{2}\] A recent line of work [33]–[37] has proposed quantum algorithms for preparing such thermal states. Although these methods can offer theoretical speedups [36], [37], their performance typically hinges on either mixing-related characteristics or temperature-dependent quantities that are challenging to estimate or control in realistic settings.
A prominent category of Gibbs sampling tasks—one which typically admits polynomial-time algorithms with provable guarantees [38], [39]—is the commuting case, where \(H\) is a commuting Hamiltonian. By leveraging the Structure Lemma [1], recent work [38] showed that Gibbs sampling for large classes of commuting Hamiltonians even reduces to Gibbs sampling for certain classical Hamiltonians; these in turn can admit powerful classical methods such as Swendsen-Wang dynamics [40], [41]. While the commuting case has been widely studied, only little is known about the non-commuting case, let alone the almost commuting case.9 Currently, all existing quantum Gibbs sampling methods fail to take such almost commuting structure into account; in particular, the techniques for the commuting case are known to break down in the presence of (even mild) non-commuting interactions. This raises the question: is it possible to extend quantum Gibbs sampling techniques for commuting Hamiltonians towards almost-commuting Hamiltonians?
In 6.2, we give an affirmative answer to this question: we use our rounding technique to reduce Gibbs sampling for certain almost commuting \(2\)-local Hamiltonians to Gibbs sampling to a nearby commuting Hamiltonian, thereby allowing one to once again make use of the full toolbox for the commuting case [38], [39]. Moreover, we show that a standard continuity bound on the stability of the Gibbs state suffices to ensure that the reduction is sound, and indeed approximately samples from the target state in 2 .
Simulating quantum-mechanical systems is one of the central tasks in quantum algorithms. It is well known that Trotter-based Hamiltonian simulation methods can perform better in the presence of commutativity in the Hamiltonian. In fact, for an exactly commuting Hamiltonian, the runtime of Hamiltonian simulation can be logarithmic in the simulation time \(t\) (as explained in 8), unlike the linear or worse scaling in the general case. This makes commutativity a useful algorithmic resource for real-time dynamics, not only a simplifying structural assumption for ground-state problems. For Hamiltonians that do not exactly commute, prior investigations [42] have shown that commutator bounds can lead to faster Trotter-based simulation algorithms. Our setting is complementary: rather than analyzing the Trotter error directly, we first round the Hamiltonian to a nearby commuting one and then simulate the remaining discrepancy separately.
In 6.3, we observe that our rounding, together with the "interaction picture" method of Low and Wiebe [43], gives us a way to directly leverage the first-order commutators alone to speed up Hamiltonian simulation. In a nutshell, we apply the algorithm of [43] with the fast part of the Hamiltonian being the commuting rounding, and the slow part being the error term incurred in the rounding. Intuitively, the system is evolved mostly under a nearby exactly commuting Hamiltonian, while the genuinely noncommuting remainder is treated as a perturbation in the interaction picture. Importantly, our simulation algorithm scales only with the norm of the latter term, as well as the commutator error, rather than with the total norm of the Hamiltonian. In this way, the simulation cost is governed by how far the Hamiltonian is from the commuting regime, rather than by the full norm of the Hamiltonian itself.
The work of [44] studied projections that pairwise nearly commute and used a predecessor (see Theorem 3.2 [44]) of the pinching technique we extend here. However, their techniques do not preserve the locality of the operators, and hence do not apply in our setting.
The specific question of rounding approximately commuting Hamiltonians to commuting Hamiltonians was first studied by Arad [24]. In this work, it is shown that for two-local Hamiltonians on \(d\)-dimensional qudits, whose terms are projectors, an "asymptotically good" rounding exists: that is, in the limit of the commutator error \(\varepsilon\) going to \(0\), the rounding error also goes to \(0\). However, the rounding is non-constructive and no explicit bound on the rounding error was established. Arad’s techniques also do not easily lend themselves to algorithmic rounding, since they are based on a nonconstructive compactnesss argument inspired by a work of Halmos [45]. The rounding results in [24] are incomparable to ours: they are weaker in that they only apply to Hamiltonians whose terms are projectors; at the same time, they are also more general in that they apply to local dimensions greater than \(2\) as well. We remark that Arad’s proof also makes use of local decompositions of the Hamiltonian terms, similar to the Pauli decompositions that we exploit. Comparing our results to his, we consider our main contribution to be the locality-preserving algorithmic rounding theorem with an explicit polynomial bound on the rounding error given by our analysis—to our knowledge, the first constructive rounding technique with an explicit error bound in terms of \(\epsilon\) that goes to zero as \(\epsilon \rightarrow 0\). In fact, coming up with such a bound was listed by Arad as an open question, with the suggestion that it might follow easily from the techniques of [46]. This latter paper belongs to the rich literature on rounding approximately commuting high-dimensional matrices. We do not believe this literature is directly useful or relevant to our problem because we are interested specifically in roundings that preserve the local structure of the Hamiltonian.
Turning to complexity theory, our work connects to the extensive literature on commuting local Hamiltonians. Beginning with the result of Bravyi and Vyalyi [1] that commuting \(2\)-local qubit Hamiltonians lie in \(\NP\), subsequent works have extended \(\NP\) containment results to broader commuting settings, including higher-locality qubit systems, certain qutrit systems, two-dimensional geometries, and more general interaction complexes [2]–[6]. The central contribution of this work is to extend this viewpoint beyond exact commutativity. We show that sufficiently almost commuting \(2\)-local qubit Hamiltonians can be rounded to nearby commuting Hamiltonians, thus extending the classical containment well beyond the commuting setting.
Let us now proceed with a technical overview of the result in this paper. We assume familiarity with the basic formalism of quantum information, and refer the reader to Section 2 for a refresher.
To illustrate our rounding technique, we consider the simple (although already non-trivial10) example of an \(\varepsilon\)-almost-commuting \(2\)-local Hamiltonian on a three-qubit triangle, i.e. \[\begin{align} H = h_{1,2} + h_{1,3} + h_{2,3} \, , \end{align}\] where the \(i,j\) terms pair-wise \(\epsilon\)-almost commute such that \[\begin{align} \| [h_{1,2},h_{1,3}]\| \leq \varepsilon\, , \quad \| [h_{1,3},h_{2,3}]\| \leq \varepsilon\quad\,\,\, \text{ and } \quad \| [h_{1,2},h_{2,3}]\| \leq \varepsilon \end{align}\] for some \(\varepsilon\in (0,1)\). The goal is to identify an exactly commuting Hamiltonian \(\hat{H} = \hat{h}_{1,2} + \hat{h}_{13} + \hat{h}_{1,3}\) with \([\hat{h}_{1,2},\hat{h}_{1,3}] = [\hat{h}_{1,3},\hat{h}_{2,3}] = [\hat{h}_{1,2},\hat{h}_{2,3}] = 0\), which inherits the locality of the original Hamiltonian, and which is nearby in the sense that \[\begin{align} \| h_{1,2} - \hat{h}_{1,2}\| \leq \delta(\varepsilon) \, , \quad\| h_{13} - \hat{h}_{1,3}\| \leq \delta(\varepsilon), \quad\,\,\, \text{ and } \quad \| h_{2,3} - \hat{h}_{2,3}\| \leq \delta(\varepsilon) \end{align}\] for some function \(\delta(\varepsilon)\) with the property that \(\delta(\varepsilon) \rightarrow 0\) as \(\varepsilon\rightarrow 0\).
Let us first consider the Hamiltonian terms \(h_{1,2}\) and \(h_{1,3}\). Using a local expansion in terms of the Pauli basis \(\{\sigma^{(i)}\}_{i=0}^3\) given in 6, we can expand the Hamiltonian terms in \(H\) as follows:11 \[\begin{align} h_{1,2} &= \sum_{\alpha=0}^3 A^{(\alpha)}_1 \otimes \sigma_2^{(\alpha)} \tag{3}\\ h_{1,3} &= \sum_{\beta=0}^3 B^{(\beta)}_1 \otimes \sigma_3^{(\beta)} \tag{4} \end{align}\] for some collections of Hermitian matrices \(\{A_1^{(\alpha)}\}_\alpha\) and \(\{B_1^{(\beta)}\}_\beta\) in \(\mathbb{C}^{2 \times 2}\). Since we know that \(\|[h_{1,2},h_{1,3}]\| \leq \varepsilon\), it is tempting to argue that the almost-commuting property must also "propagate" down to the collections of matrices \(\{A^{(\alpha)}\}_\alpha\) and \(\{B^{(\beta)}\}_\beta\). In 6, we show that this is indeed the case, leveraging the fact that \(\{\sigma^{(i)}\}_{i=0}^3\) form an orthogonal basis of the space of \(2\times 2\) complex matrices under the Hilbert-Schmidt inner product. Concretely, we can argue that \[\begin{align} \label{eq:almost-commuting-A-B} \|[A_1^{(\alpha)}, B_1^{(\beta)}]\| \leq \varepsilon, \quad \forall \alpha,\beta=0,1,2,3. \end{align}\tag{5}\] This observation allows us to effectively reduce the task of rounding a \(2\)-qubit operator to that of rounding a collection of single-qubit operators; in other words, the goal now is to find nearby matrices \(\{\hat{A}_1^{(\alpha)}\}_\alpha\) and \(\{\hat{B}_1^{(\beta)}\}_\beta\) which perfectly pairwise commute i.e. \([\hat{A}_1^{(\alpha)}, \hat{B}_1^{(\beta)}]=0\), for all \(\alpha,\beta\).
How can we make two almost-commuting \(2 \times 2\) Hermitian matrices commute? Here, we take inspiration from the well-known pinching technique for projectors (e.g. [44]). Suppose that \(A,B \in \mathbb{C}^{2 \times 2}\) are arbitrary Hermitian matrices such that \(\|[A,B]\| \leq \varepsilon\); for example, as in 5 . First, we observe that the spectral theorem allows us to expand the matrix \(A\) as \[\begin{align} A = \lambda_{\min}(A) \, \Pi + \lambda_{\max}(A) \, (I -\Pi), \end{align}\] where \(\lambda_{\min},\lambda_{\max} \in \mathbb{R}\) are eigenvalues and \(\Pi\) and \((I -\Pi)\) are orthogonal projectors onto the eigenspaces. To pinch \(B\) by \(A\) (concretely, by the eigenspace projectors associated with \(A\)), we map \[\begin{align} \label{eq:ex-pinchining} B \quad \mapsto \quad \hat{B} = \Pi \, B \, \Pi + (I-\Pi) B (I-\Pi). \end{align}\tag{6}\] Because \(\hat{B}\) is now diagonal in the eigenbasis of \(A\), we can see that \([\hat{B},A]=0\), and hence the two matrices perfectly commute. Moreover, a simple argument (formally proven in 2) reveals that the distance between \(\hat{B}\) and \(B\) is at most \[\begin{align} \label{eq:pinching-for-B} \|\hat{B} - B\| \, \leq \, \frac{\|[A,B]\|}{\Delta(A)} \, \leq \, \frac{\varepsilon}{\Delta(A)} \, , \end{align}\tag{7}\] where \(\Delta(A) = |\lambda_{\max}(A) - \lambda_{\min}(A)|\) is the spectral gap of \(A\). This immediately presents a problem: if the eigenvalues of \(A\) are extremely close to one another, the spectral gap \(\Delta(A)\) can be vanishingly small, thereby causing the distance between \(\hat{B}\) and \(B\) to blow up. In general, we may not have any control over the spectral properties that arise from the Pauli decompositions in 3 and 4 .
In order to explain how we get around the spectral gap issue, let us again revisit the example of two Hermitian matrices \(A,B \in \mathbb{C}^{2 \times 2}\) with \(\|[A,B]\| \leq \varepsilon\). We introduce a threshold parameter \(\eta \in (0,1)\) (to be determined later) and distinguish between the following cases:
(the gapped case) \(\Delta(A) \geq \eta\): in this case, the spectrum of \(A\) is sufficiently gapped, and the pinching bound in 7 translates into a well-behaved upper bound of \(\|\hat{B} - B\| \leq \, \frac{\varepsilon}{\eta}\).
(the nearly-degenerate case) \(\Delta(A) < \eta\): in this case, the pinching bound in 7 may blow up; fortunately, however, a small gap \(\Delta(A)\) necessarily means that \(A\) must also be close to a multiple of the identity. Instead of pinching \(B\), we can simply snap \(A\) towards \(\hat{A} = \lambda_{\max}(A) I\). Importantly, this makes \(\hat{A}\) trivially commute with not just \(B\) but in fact any other matrix as well—an important fact we will crucially exploit later on. A simple calculation (formally shown in 3) reveals that \(\|\hat{A} - A\|\) is at most \(\Delta(A)\), and thus \(\|\hat{A} - A\| < \eta\).
For example, letting \(\eta = \sqrt{\varepsilon}\), we can always find a nearby commuting matrix within distance \(\sqrt{\varepsilon}\); either by pinching \(B\) to get \(\hat{B}\) such that \([\hat{B},A]=0\) and \(\|\hat{B} - B\| \leq \frac{\varepsilon}{\eta} = \sqrt{\varepsilon}\), or by snapping \(A\) to get \(\hat{A}\) such that \([B,\hat{A}]=0\) and \(\|\hat{A} - A\| < \eta = \sqrt{\varepsilon}\). Note that the \(2 \times 2\) qubit structure in the "gap or snap" approach for \(A,B \in \mathbb{C}^{2 \times 2}\) is crucial; indeed, in the qudit case, it is entirely possible for operators to have no spectral gap at all, and yet at the same time it is also not possible to simply "snap" them towards the identity.
Equipped with the "gap or snap" paradigm, we explain a slightly simplified version of our full locality-preserving rounding technique on the \(\varepsilon\)-almost commuting Hamiltonian \(H = h_{1,2} + h_{1,3} + h_{2,3}\) from before. (We will indicate the step that was simplified when we reach it in our explanation.) To this end, we once again use local expansions in terms of the Pauli basis \(\{\sigma^{(i)}\}_{i=0}^3\). While our earlier expansions in 3 and 4 only involved one of the qubit systems, our full rounding technique makes use of Pauli expansions on both of the qubits; that is, for each of the terms \(h_{12}, h_{13}\) and \(h_{23}\), we consider both possible expansions as follows: \[\begin{align} h_{1,2} &= \sum_{\alpha=0}^3 A^{(\alpha)}_1 \otimes \sigma_2^{(\alpha)} = \sum_{\alpha=0}^3 \sigma^{(\alpha)}_1 \otimes A_2^{(\alpha)} \quad\quad\quad \text{ for } \quad \{A_1^{(\alpha)}\}_{\alpha=0}^3\, , \quad \{A_2^{(\alpha)}\}_{\alpha=0}^3\quad\tag{8}\\ h_{1,3} &= \sum_{\beta=0}^3 B^{(\beta)}_1 \otimes \sigma_3^{(\beta)} = \sum_{\beta=0}^3 \sigma^{(\beta)}_1 \otimes B_3^{(\beta)} \quad\quad\quad \,\text{ for } \quad \{B_1^{(\beta)}\}_{\beta=0}^3\, , \quad \{B_3^{(\beta)}\}_{\beta=0}^3\quad\tag{9} \\h_{2,3} &= \sum_{\gamma=0}^3 C^{(\gamma)}_2 \otimes \sigma_3^{(\gamma)} = \sum_{\gamma=0}^3 \sigma^{(\gamma)}_2 \otimes C_3^{(\gamma)} \quad\quad\, \,\,\,\,\,\text{ for } \quad \{C_2^{(\gamma)}\}_{\gamma=0}^3\, , \quad \{C_3^{(\gamma)}\}_{\gamma=0}^3 \quad\tag{10} \end{align}\] For convenience’ sake, we refer to the left decomposition in 8 as the decomposition "about qubit \(1\)", and the right decomposition in the same equation as the decomposition "about qubit \(2\)"—and similarly for the others. Note that each expansion introduces a collection of four Hermitian matrices in \(\mathbb{C}^{2 \times 2}\): in the decomposition "about qubit \(i\)", these four matrices act on qubit \(i\). In a slight abuse of notation, we use the same variable and rely on the subscript to indicate which qubit the matrices act on, as well as which of the two sets of matrices we are referring to. Thanks to our previous insight that the \(\varepsilon\)-almost-commuting property of \(h_{1,2}, h_{1,3}\) and \(h_{2,3}\) "propagates" down to the collections of matrices acting on the same qubit (formally, 6), we get \[\begin{align} \|[A_1^{(\alpha)}, B_1^{(\beta)}]\| &\leq \varepsilon, \quad\quad \forall \alpha,\beta=0,1,2,3 \tag{11}\\ \|[A_2^{(\alpha)}, C_2^{(\gamma)}]\| &\leq \varepsilon, \quad\quad \forall \alpha,\gamma=0,1,2,3 \tag{12}\\ \|[B_3^{(\beta)}, C_3^{(\gamma)}]\| &\leq \varepsilon, \quad \forall \beta,\gamma=0,1,2,3\tag{13} \end{align}\] We may visualize the commutation structure of the triangle Hamiltonian as a graph \(G=(V,E)\); here the vertex set \(V\) consists of the \(24\) matrices in 8 , 9 10 , and \(E\) contains edges between vertex pairs which are \(\varepsilon\)-almost commuting according to 11 , 12 and 13 . We can group vertices belonging to the same Hamiltonian term together, and we can use a top and bottom vertex layer within each cluster to represent the two possible Pauli expansions (e.g., see 2).
Choose \(\eta =\varepsilon^{1/3}\). Then, our locality-preserving rounding technique takes place as follows:
(Partitioning:) Split the almost-commuting Hamiltonian \(H\) into a gapped and nearly-degenerate part (depending on \(\eta\)) such that \(H= H_{\mathrm{gap}} + H_{\mathrm{deg}}\), where
\(H_{\mathrm{gap}}\) features Hamiltonian terms for which both sets of the two possible Pauli expansions contain a matrix of spectral gap of at least \(\eta\) (these particular matrices will enable us to round to nearby commuting matrices via pinching), and
\(H_{\mathrm{deg}}\) features Hamiltonian terms that do not satisfy the gap condition: morally, these terms act "almost trivially" on at least one of the qubits they touch.
(Snap:) For each term in \(h_{i,j} \in H_{\mathrm{deg}}\), we use snapping to round it to a term that is exactly trivial on at least on qubit. Concretely, suppose \(h_{1,2}\) is in \(H_{\mathrm{deg}}\) because its decomposition \[h_{1,2} = \sum_{\alpha=0}^{3} A_1^\alpha \otimes \sigma_2^{(\alpha)}\] is not gapped—that is, each matrix \(A_1^\alpha\) has spectral gap smaller than \(\eta\). Then snapping simply consists of replacing each \(A_1^\alpha\) in the decomposition with the appropriate multiple of identity, yielding a new operator \(h'_{1,2}\) that is effectively 1-local, and may in fact be simply a multiple of the identity. As a simplifying assumption, we will suppose that all the post-snapping operators \(h'_{i,j}\) are in fact multiples of identity: the general case including 1-local operators is more cumbersome, requiring an additional round of snapping with a larger gap parameter, but conceptually no more difficult than this special case. Let \(H'\) be \(H\) after snapping has been performed (with all the terms in \(H_{\mathrm{gap}}\) unchanged). This step incurs an error of \(O(\eta)\).
(Gap:) We are now in the position that for every Hamiltonian term that acts nontrivially on a qubit, the operators in its Pauli decomposition for that qubit are guaranteed to have a spectral gap. Intuitively, the spectral gap means these operators have a "strong opinion" about the correct basis in which to pinch this qubit, and our algorithm will listen to them. More precisely, for any qubit \(i\) that is nontrivially acted on by at least two terms of \(H'\), pick any gapped operator in the decomposition "about qubit \(i\)" of the terms acting on \(i\), and set it to be the pivot \(R_i\) associated with \(i\). (If a qubit does not have two nontrivial terms, set the pivot to be identity.) Once a pivot has been identified for each qubit, pinch each Hamiltonian term \(h'_{i,j}\) simultaneously by the pivots \(R_i\) and \(R_j\): mathematically, \[h'_{i,j} \mapsto \hat{h}_{i,j} = (\mathcal{P}_i \otimes \mathcal{P}_j)(h'_{i,j}),\] where \(\mathcal{P}_i\) is the pinching superoperator given by \[\begin{align} \label{eq:pinching-superoperator-overview} \mathcal{P}_i(X) = \Pi_i \, X \, \Pi_i + (I-\Pi_i) X (I-\Pi_i)\, \end{align}\tag{14}\] and where \(\Pi_i\) and \(I-\Pi_i\) are the eigenspace projectors of the \(i\)-th pivot element. The Hamiltonian \(\hat{H} = \sum_{(i,j)} \hat{h}_{i,j}\) is the final product of our rounding procedure.
After the pinching process is complete, it is easy to see that all the terms \(\hat{h}_{i,j}\) are forced to commute with each other by construction. What is harder to see is that this does not incur a large error. This is essentially for two reasons:
Propagation: If we imagine pinching \(h'_{i,j}\) by a pivot arising from a different Hamiltonian term \(h'_{i,k}\), then this pivot is guaranteed to almost commute—up to error \(\varepsilon\)—with all terms in the decomposition of \(h'_{i,j}\) by the fact that \(h'_{i,j}\) and \(h'_{i,k}\) approximately commute, together with 6.
Transitivity: If we imagine pinching \(h'_{i,j}\) by a pivot arising from the same Hamiltonian term \(h'_{i,j}\), then this pivot can be shown to almost commute with all other terms in the decomposition of \(h'_{i,j}\) by using the transitivity of commutation for gapped matrices, by passing through another term \(h'_{i,k}\). This is illustrated in 2. The transitivity uses the gapped property of \(h'_{i,k}\), and yields a slightly worse commutator error of \(\varepsilon/\eta\).
Thus, the pivot by with we pinch a given Hamiltonian term commutes with that term up to error at most \(\kappa = \varepsilon/\eta\), and it can be shown that the error induced in pinching is at most \(O(\kappa / \eta) = O(\varepsilon/\eta^2)\). (We refer to 7 for a formal analysis of the pinching operation.) Our choice of \(\eta = \varepsilon^{1/3}\) balances the errors from the gap and snap steps, giving us an overall error of \(O(\varepsilon^{1/3})\). In the more general case, where our simplifying assumption in the snapping step is removed, it turns out a second round of snapping is needed: this introduces a further error, so our final bound in the general case turns out to be \(O(\varepsilon^{1/6})\).
Notice that the Hamiltonian \(\hat{H}\) inherits the same locality from the original Hamiltonian \(H\); this is due to the local nature of our pinching and snapping techniques. In 8, we show that our rounding technique—when applied to the triangle Hamiltonian—yields an exactly commuting Hamiltonian \(\hat{H} = \hat{h}_{1,2} + \hat{h}_{2,3} + \hat{h}_{1,3}\) with \([\hat{h}_{1,2},\hat{h}_{1,3}] = [\hat{h}_{1,3},\hat{h}_{2,3}] = [\hat{h}_{1,2},\hat{h}_{2,3}] = 0\) and \[\| H - \hat{H} \| \, \leq \, O(\varepsilon^{1/6}).\] Our rounding technique thus rests on two important structural facts: (i) approximate commutation of Hamiltonian terms propagates to the single-qubit operators in their Pauli decompositions, and (ii) pinching against gapped local pivots enforces exact commutation while preserving locality. In this sense, our procedure is a consistent local change of basis across the interaction graph, with snapping handling terms which are too close to the identity to select a stable basis.
We now illustrate the rounding procedure on a concrete triangle Hamiltonian on three qubits, shown in 3.
The terms \(h_{1,2}\) and \(h_{2,3}\) commute exactly: both are controlled on the shared qubit, qubit \(2\), in the standard basis. On the other hand, \(h_{1,3}\) acts in the \(X\) basis on qubits \(1\) and \(3\), and therefore commutes only approximately with \(h_{1,2}\) and \(h_{2,3}\); the obstruction comes from the \(Z\)-basis components of \(h_{1,2}\) and \(h_{2,3}\), whose coefficients are suppressed by the factor \(1/100\).
This example is useful because it rules out a naïve sequential approach to rounding. One might try first to round the already commuting pair \(h_{1,2},h_{2,3}\) to an exactly commuting pair \(\hat{h}_{1,2},\hat{h}_{2,3}\), without taking \(h_{1,3}\) into account, and only afterwards try to round \(h_{1,3}\) to some \(\hat{h}_{1,3}\) that commutes with both of them. However, for the particular pair \(h_{1,2},h_{2,3}\) above, there is no operator on qubits \(1\) and \(3\) that acts nontrivially on both qubits and commutes exactly with both \(h_{1,2}\) and \(h_{2,3}\). Thus any successful rounding must modify at least one of \(h_{1,2}\) or \(h_{2,3}\), despite the fact that these two terms commute perfectly with each other. This illustrates why the rounding procedure must be global in nature: the choice of how to round one pair of terms cannot be made independently of the remaining interactions.
Let us now see how the one-shot rounding procedure handles this example. All three terms are gapped in the relevant sense in both of their possible Pauli decompositions, so the partitioning and snapping steps are trivial. The only nontrivial part of the procedure is the gapped rounding step, in which we choose a pivot operator \(A_i\) for each qubit \(i\) and then pinch the Hamiltonian terms with respect to these pivots.
We begin with qubit \(2\). The terms acting on qubit \(2\) are already written in the appropriate form, with the Pauli operators placed on the non-shared qubits \(1\) and \(3\): \[\begin{align} h_{1,{\color{blue}2}} &= {\color{blue}(\ket{0}\!\bra{0})_2} \otimes X_1 + \frac{1}{100} {\color{blue}(\ket{1}\!\bra{1})_2} \otimes Z_1, \\ h_{{\color{blue}2},3} &= {\color{blue}(\ket{0}\!\bra{0})_2} \otimes X_3 + \frac{1}{100} {\color{blue}(\ket{1}\!\bra{1})_2} \otimes Z_3. \end{align}\] Thus we may choose either \(\ket{0}\!\bra{0}\) or \(\ket{1}\!\bra{1}\) as the pivot on qubit \(2\); these choices define the same eigenbasis. We take \[A_2 = (\ket{0}\!\bra{0})_2 .\]
Next consider qubit \(1\). The term \(h_{1,3}\) is already expressed in the desired form, while \(h_{1,2}\) must be rewritten so that the Pauli operators act on the non-shared qubit \(2\): \[\begin{align} h_{{\color{red}1},2} &= \frac{1}{2} {\color{red}\left(X + \frac{1}{100} Z\right)_1} \otimes I_2 + \frac{1}{2} {\color{red}\left(X - \frac{1}{100} Z\right)_1} \otimes Z_2, \\ h_{{\color{red}1},3} &= {\color{red}X_1} \otimes X_3 . \end{align}\] There are several possible gapped choices for the pivot. For simplicity, we take \[A_1 = X_1 .\]
Finally, for qubit \(3\), we proceed in the same way: \[\begin{align} h_{2,\textcolor{DarkGreen}{3}} &= \frac{1}{2} I_2 \otimes \textcolor{DarkGreen}{\left(X + \frac{1}{100} Z\right)_3} + \frac{1}{2} Z_2 \otimes \textcolor{DarkGreen}{\left(X - \frac{1}{100} Z\right)_3}, \\ h_{1,\textcolor{DarkGreen}{3}} &= X_1 \otimes \textcolor{DarkGreen}{X_3}. \end{align}\] Again, we choose the convenient pivot \[A_3 = X_3 .\]
With these choices of pivots, the pinching step is especially transparent: it forces the Hamiltonian to be diagonal in the tensor-product basis defined by the \(X\) basis on qubit \(1\), the standard basis on qubit \(2\), and the \(X\) basis on qubit \(3\). The rounded Hamiltonian \[\hat{H} = \hat{h}_{1,2} + \hat{h}_{1,3} + \hat{h}_{2,3}\] is therefore given by \[\begin{align} \hat{h}_{1,2} &= X_1 \otimes \ket{0}\!\bra{0}_2, \\ \hat{h}_{1,3} &= X_1 \otimes X_3, \\ \hat{h}_{2,3} &= \ket{0}\!\bra{0}_2 \otimes X_3. \end{align}\] These three terms now commute exactly.
This simple example also illustrates the role played by transitivity of commutation for \(2 \times 2\) matrices. As discussed above, transitivity is what allows the rounding procedure to control commutation relations among different operators appearing in the Pauli decomposition of a single Hamiltonian term. In the present example, this control is reflected in the fact that the small \(Z\)-components in \(h_{1,2}\) and \(h_{2,3}\) are compatible with the choice of \(X\)-basis pivots on qubits \(1\) and \(3\).
One way to see this is to ask what would happen if the coefficient \(1/100\) in \(h_{1,2}\) were replaced by \(1\). Then \(h_{1,2}\) and \(h_{2,3}\) would still commute exactly, since they would remain diagonal in the same basis on the shared qubit \(2\). However, the commutator between \(h_{1,2}\) and \(h_{1,3}\) would become large. In fact, \(h_{1,2}\) would no longer commute with any operator on qubits \(1\) and \(3\) that acts nontrivially on both qubits. Thus the smallness of the noncommuting component is essential: it is precisely what permits the global choice of pivots to round all three terms simultaneously.
The same mechanism extends from this triangle example to general \(2\)-local qubit Hamiltonians with \(m\) terms. Rather than choosing a rounding separately for each pair of Hamiltonian terms, the algorithm chooses pivots at the level of individual qubits. Each Hamiltonian term is then pinched with respect to the pivots on the qubits it touches. This one-shot choice is what preserves locality while enforcing exact commutation globally: once all of the terms are diagonal in the local bases specified by the pivots, every pair of rounded terms now commutes exactly.
The example above captures the main reason such a global procedure is needed. Even when two terms commute exactly, keeping them fixed may be incompatible with rounding the rest of the Hamiltonian. The rounding algorithm therefore treats the Hamiltonian as a whole, using the approximately commuting structure to identify local bases that are simultaneously compatible across all interactions.
The most natural immediate next questions to investigate are whether our rounding can be extended to systems of higher locality or local dimension. We suspect that going beyond qubits may be challenging, since the transitivity property that is crucial to our proof is no longer true for higher dimensions (even for dimension 3).
Another direction for generalization is to study looser notions of approximate commutation. For instance, what can we say if we only have a bound on the average norm of the commutators? Similar regimes were studied algorithmically in [39].
In the context of complexity theory, one interesting direction is to see what our result implies about the quantum PCP conjecture. Recall that our rounding result already implies that any qPCP-hard family of 2-local qubit Hamiltonians must exhibit some moderate amount of noncommutativity: assuming \(\mathsf{NP} \neq \mathsf{QMA}\), any family of \(2\)-local qubit Hamiltonians for which the \(\gamma\)-LH problem is \(\QMA\)-hard for constant \(\gamma\) must allow for pairwise commutator norms of \(\omega(\frac{1}{m^6})\). It would be interesting to see whether this bound can be improved, for instance by finding a better rounding technique with an improved dependence on \(\epsilon\).
Taking an alternate perspective, the complexity of the general \(k\)-local commuting Hamiltonian problem on qudits is wide open, and it is possible that some version of this problem is even qPCP-hard. Moreover, it is possible that gap-amplifying transformations for commuting Hamiltonians will be easier to design than for general Hamiltonians. Could some rounding scheme along the lines of ours show that gap amplification for commuting Hamiltonians directly implies the quantum PCP conjecture?
Special thanks to Thomas Vidick for an inspirational email conversation at the start of this project. We also thank Christopher Laumann, Jiaqing Jiang, and Thomas Vidick for useful conversations on the general status for commuting and almost commuting Hamiltonians. We thank ChatGPT for the support with our literature review and the design of our figures. AN was partially supported by NSF CAREER Award 2339948.
The \(d\)-dimensional complex vector space is denoted by \(\mathbb{C}^d\). We use \(\mathrm{L}(V,W)\) to denote the set of linear operators mapping between finite-dimensional complex vector spaces \(V\) and \(W\), and we use \(\mathrm{L}(\mathbb{C}^d)\) to denote the set of linear operators over \(\mathbb{C}^d\). The operator norm of a linear operator \(A \in \mathrm{L}(V,W)\), for some finite-dimensional complex vector spaces \(V \neq \{0\}\) and \(W\) is given by \[\begin{align} \|A \| = \sup_{\|x\|_2 =1} \|A x\|_2 \, , \end{align}\] where \(\|x \|_2 = \sqrt{\langle x,x \rangle}\) is the standard Euclidean norm; we occasionally omit the subscript for convenience. The operator norm satisfies the triangle inequality and is sub-multiplicative with \(\|A \cdot B\| \leq \|A\| \cdot \|B\|\), for all \(A,B \in \mathrm{L}(V,W)\). A linear operator \(A \in \mathrm{L}(\mathbb{C}^d)\) is called positive semi-definite (PSD), denoted by \(A \succeq 0\), whenever \(x^\dagger A x \geq 0\), for all \(x \in \mathbb{C}^d\), and where \(\dagger\) is the adjoint. A unitary \(U: \mathrm{L} (\mathbb{C}^d) \to \mathrm{L}(\mathbb{C}^d)\) is a linear operator such that \(U^\dagger U = U U^\dagger = I\), where \(I\) is the identity matrix on \(\mathbb{C}^d\). A linear operator \(H \in \mathrm{L}(\mathbb{C}^d)\) is called Hermitian if \(H^\dagger = H\). We use \(\mathrm{Herm}(C^{d})\) to denote the set of \(d\)-dimensional Hermitian matrices. A Hermitian operator \(\Pi \in \mathrm{Herm}(\mathbb{C}^{d})\) is called a projector if \(\Pi^2=\Pi\). Any \(A \in \mathrm{Herm}(\mathbb{C}^{2})\) admits a spectral decomposition of the form \[\begin{align} A = \lambda_1 \Pi + \lambda_2 (I -\Pi) \end{align}\] where \(\lambda_1,\lambda_2 \in \mathbb{R}\) are the eigenvalues of \(A\), and where \(\Pi\) and \((I-\Pi)\) are the projectors onto the respective eigenspaces of \(A\); we call the eigenvalue difference \[\begin{align} \Delta(A) := |\lambda_1 - \lambda_2| \end{align}\] the spectral gap of \(A\), and we say that \(A\) is \(\eta\)-gapped if \(\Delta(N) \geq \eta\).
Let \(A,B \in \mathbb{C}^{d \times d}\). Then, the commutator between \(A\) and \(B\) is defined as \[[A, B] := AB - BA.\] We say that \(A\) commutes with \(B\) (equivalently, \(B\) commutes with \(A\)) if \([A, B] = 0\) or \(AB = BA\). We say that \(A\) and \(B\) \(\varepsilon\)-almost commute if there exists \(\varepsilon>0\) such that \[\|[A,B]\| \leq \varepsilon\, ,\] where \(\|\cdot\|\) is the operator norm. We use the following elementary fact about the commutator.
factTransitivityLeadingFact Let \(A,B,C \in \mathbb{C}^{d \times d}\) be arbitrary matrices. Then, \[\| [A,C] \| \leq 2 \cdot \|A-B\| \cdot \|C\|+ \| [B,C]||.\]
Proof. First, notice that the commutator is linear in the sense that \[\begin{align} [A,C] = [A-B,C] + [B,C]. \end{align}\] Using the triangle inequality and the sub-multiplicativity of the operator norm, we get \[\begin{align} \| [A,C] \| &= \| [A-B,C] + [B,C] \| \\ &\leq \| [A-B,C]\| + \|[B,C] \| \\ &= \| (A-B)C - C(A-B)\| + \|[B,C] \| \\ &\leq \| (A-B)C\| + \|C(A-B)\| + \|[B,C] \|\\ &\leq 2 \cdot \|A-B\| \cdot \|C\| + \| [B,C]||. \end{align}\] ◻
We use the following well-known fact about commuting Hermitian matrices.
Fact 1 (Simultaneous Diagonalization). Let \(A,B \in \mathrm{Herm}(\mathbb{C}^{2})\) be exactly commuting Hermitian matrices. Then, \(A\) and \(B\) can be simultaneously diagonalized* in the following sense: there exists a spectral decomposition via common eigenspace projectors \(\Pi\) and \((I-\Pi)\) such that \[A = a_1 \Pi + a_2 (I -\Pi) \quad\quad \text{and} \quad\quad B = b_1 \Pi + b_2 (I - \Pi) \,\] where \(a_1,a_2 \in \mathbb{R}\) and \(b_1,b_2 \in \mathbb{R}\) are the eigenvalues of \(A\) and \(B\), respectfully.*
We use Weyl’s inequality (e.g., see [47]) which states that the eigenvalue spectra of Hermitian matrices remains stable under perturbations.
Lemma 1 (Weyl’s inequality). Let \(A,B \in \mathrm{Herm}(\mathbb{C}^{d})\). Then, for all \(i \in [d]\), \[\left|\lambda_i(A+B) - \lambda_i(A) \right| \, \leq \, \|B\| \, ,\] where \(\lambda_i(A)\) and \(\lambda_i(A+B)\) denote the \(i\)-th eigenvalues of \(A\) and \(A+B\), respectfully.
The following is a direct consequence of Weyl’s inequality in 1.
Fact 2. Let \(A,B \in \mathrm{Herm}(\mathbb{C}^{d})\) and \(\varepsilon\geq 0\). Then, \(\|A - B\| \leq \varepsilon\) implies \(|\lambda_{\mathrm{min}}(A) -\lambda_{\mathrm{min}}(B)| \leq \varepsilon\).
A finite-dimensional complex Hilbert space is denoted by \(\mathcal{H}\), and we use subscripts to distinguish between different systems (or registers); for example, we let \(\mathcal{H}_{1}\) be the Hilbert space corresponding to the system labeled as \(1\). The tensor product of two Hilbert spaces \(\mathcal{H}_{1}\) and \(\mathcal{H}_{2}\) is another Hilbert space which we denote by \(\mathcal{H}_{1,2} = \mathcal{H}_{1} \otimes \mathcal{H}_{2}\).
A quantum system over the \(2\)-dimensional Hilbert space \(\mathcal{H} \cong \mathbb{C}^2\) is called a qubit; in general, when \(\mathcal{H} \cong \mathbb{C}^d\) for \(d \geq 2\), we call it a qudit. For \(n \in \mathbb{N}\), we refer to quantum registers over the Hilbert space \(\mathcal{H} \cong \big(\mathbb{C}^2\big)^{\otimes n}\) as \(n\)-qubit states. We use the word quantum state to refer to both pure states (unit vectors \(\ket{\psi} \in \mathcal{H}\)), as well as density matrices \(\rho \in \mathrm{D}(\mathcal{H})\) with \[\begin{align} \mathrm{D}(\mathcal{H}) = \{ \rho \in \mathrm{L}(\mathcal{H}) \, : \, \rho \text{ is Hermitian, \rho \geq 0 and } \mathrm{Tr}[\rho] =1\}. \end{align}\] Given a bipartite operator \(\rho_{1,2} \in \mathrm{D}(\mathcal{H}_{1,2})\), we denote the partial trace over a system, say the second system, by \(\mathrm{Tr}_2[\cdot]\), and we call \(\rho_1=\mathrm{Tr}_2[\rho_{1,2}]\) the reduced state. We use the following simple fact:
factFactOPNormPTrace Let \(\mathcal{H}_{1,2} = \mathcal{H}_{1} \otimes \mathcal{H}_{2}\) be a bipartite Hilbert space, for two finite-dimensional complex Hilbert spaces \(\mathcal{H}_{1}\) and \(\mathcal{H}_{2}\) of dimension \(d_1\) and \(d_2\), respectfully. Then, it holds that \[\begin{align} \|\rho_{1,2}\| \geq \frac{1}{d_2} \, \|\mathrm{Tr}_2(\rho_{1,2})\|, \quad \quad \forall \rho_{1,2} \in \mathrm{D}(\mathcal{H}_{1,2}). \end{align}\]
Proof. By the variational characterization of the operator norm, we have \[\begin{align} \|\rho_{1,2}\| &= \max_{\tau_{1,2} \in \mathrm{D}(\mathcal{H}_{1,2})} \mathrm{Tr}\big(\rho_{1,2} \tau_{1,2}\big) \\ &\ge \max_{\sigma_1 \in \mathrm{D}(\mathcal{H}_1)} \mathrm{Tr}\Big(\rho_{1,2} \big(\sigma_1 \otimes \frac{I_2}{d_2}\big)\Big) \\ &= \max_{\sigma_1 \in \mathrm{D}(\mathcal{H}_1)} \frac{1}{d_2} \mathrm{Tr}\big( \mathrm{Tr}_2(\rho_{1,2}) \, \sigma_1 \big) \\ &= \frac{1}{d_2} \, \max_{\sigma_1 \in \mathrm{D}(\mathcal{H}_1)} \mathrm{Tr}\big( \mathrm{Tr}_2(\rho_{1,2}) \, \sigma_1 \big) \\ &= \frac{1}{d_2} \, \|\mathrm{Tr}_2(\rho_{1,2})\|. \end{align}\] In the third line, we used the standard identity \(\mathrm{Tr}\big(\rho_{12} (\sigma_1 \otimes I_2)\big) = \mathrm{Tr}\big(\mathrm{Tr}_2(\rho_{12}) \, \sigma_1\big)\) to reduce the partial trace explicitly. This completes the proof. ◻
The four \(2\times 2\) Pauli matrices are denoted as \[\begin{align} \sigma^{(0)} &= I = \begin{pmatrix} 1 & 0 \\0 & 1 \end{pmatrix}, \quad\quad\,\,\,\,\sigma^{(1)} = X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\\ \sigma^{(2)} &= Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad\quad \sigma^{(3)} = Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}. \end{align}\] Note that the Pauli matrices are all Hermitian, and therefore referred to as observables.
Fact 3 (Properties of the Pauli matrices). The Pauli matrices \(\{\sigma^{(\alpha)}\}_{\alpha =0}^3\) satisfy \[\begin{align} \label{trace-of-product-of-paulis} &\mathrm{Tr}[\sigma^{(0)}]=2, \quad\mathrm{Tr}\big[\sigma^{(\alpha)}\big]= 0, \,\, \forall\alpha =1,2,3, \quad \text{ and }\\ &\mathrm{Tr}\left[\sigma^{(\alpha)} \sigma^{(\beta)}\right] = 2 \delta_{\alpha,\beta}, \quad \forall \alpha,\beta =0,1,2,3\, , \end{align}\qquad{(1)}\] and form an orthogonal basis of \(\mathbb{C}^{2 \times 2}\) with respect to the Hilbert-Schmidt inner product; in other words, any linear operator \(A \in \mathbb{C}^{2 \times 2}\) can be written as a complex linear combination of the form \[\begin{align} A = \sum_{\alpha=0}^3 \mathrm{Tr}\left[\sigma^{(\alpha)} A\right] \cdot \sigma^{(\alpha)}. \end{align}\]
We begin by recalling the promise-problem formulation of the local Hamiltonian problem. This language is convenient because local Hamiltonian problems naturally come with an energy gap promise: an instance is assumed to be either below a lower threshold or above an upper threshold, with no requirement on what happens in between.
Definition 1 (Binary Promise Problem). Let \(\{0, 1\}^*\) be the set of all binary strings. \(A = \left(A_{\mathrm{YES}}, A_{\mathrm{NO}}\right)\) is called a binary promise problem when \(A_{\mathrm{YES}} \subseteq \{0, 1\}^*\), \(A_{\mathrm{NO}} \subseteq \{0, 1\}^*\), and \(A_{\mathrm{YES}} \cap A_{\mathrm{NO}} = \emptyset\).
We now specialize this general notion to the \(2\)-local Hamiltonian problem. Throughout the paper, we keep track of both the absolute promise gap and the relative promise gap, since the latter is the natural normalization when the Hamiltonian has \(m\) local terms.
Definition 2 (\(2\)-Local Hamiltonian Problem \(\gamma\)-\(2\)-\(\mathrm{LH}\)). The \(2\)-local Hamiltonian problem notated as \(\gamma\)-\(2\)-\(\mathrm{LH}\)is a binary promise problem where the input is a classical binary string \(x = (H, a, b)\) such that:
\(H\) is a \(2\)-local Hamiltonian \(H = \sum\limits_{(i, j) \in E} h_{i, j}\) on a total of \(n\) qubits where \(E \subseteq [n] \times [n]\) and \(|E| = m = \poly(n)\) and each \(h_{i,j}\) is a Hermitian matrix with a bounded operator norm \(\|h_{i,j}\| \leq 1\) and its entries are specified by \(\poly(n)\) bits and \(h_{i,j}\) is non-identity on at most \(2\) qubits (namely \(i\), \(j\)),
\(a\) and \(b\) are two numbers represented with \(\poly(n)\) bits such that \(a < b\); the gap \(\Gamma = b - a\) is called the absolute promise gap and \(\gamma = \Gamma / m\) is called the relative promise gap,
for yes-instances, there exists an \(n\)-qubit quantum state \(\ket{\psi}\) such that \(\bra{\psi}H\ket{\psi} \leq a\) (i.e. energy of the state w.r.t. \(H\) is at most \(a\)),
for no-instances, for every \(n\)-qubit quantum state \(\ket{\psi}\), it holds that \(\bra{\psi}H\ket{\psi} \geq b\) (i.e. energy of the state w.r.t. \(H\) is at least \(b\)), and
it is promised that any instance will be either a yes or no instance.
The main objects of this paper are restricted versions of the local Hamiltonian problem in which the local terms commute, or nearly commute, with one another. The exactly commuting case serves as the classical benchmark against which we compare the almost commuting setting.
Definition 3 (Commuting \(2\)-Local Hamiltonian Problem). The Commuting Local Hamiltonian Problem notated as \(\gamma\)-\(2\)-\(\mathrm{CLH}\) is defined as the \(\gamma\)-\(2\)-\(\mathrm{LH}\)problem in 2 with an additional restriction on the input that any pair of terms commute; in other words, \[\left[h_{i, j}, h_{k, \ell}\right] = 0, \quad\quad \forall (i, j) \in E, \,\, \forall (k, \ell) \in E.\]
We also introduce the almost commuting analogue, where exact commutation is relaxed to a uniform operator-norm bound on all pairwise commutators. This is the promise problem to which our rounding theorem will later be applied.
Definition 4 (Almost Commuting Local Hamiltonian Problem). The Almost Commuting \(2\)-Local Hamiltonian Problem notated as \((\gamma, \varepsilon)\)-\(2\)-\(\mathrm{ACLH}\) is defined as the \(\gamma\)-\(2\)-\(\mathrm{LH}\)problem in 2 with an additional restriction that any pair of terms \(\varepsilon\)-almost-commute: \[\begin{align} \,\,\,\, \|\big[h_{i, j}, h_{k, \ell}\big]\| \leq \varepsilon\, , \quad\quad \forall (i, j) \in E, \,\, \forall (k, \ell) \in E. \end{align}\]
We next recall the complexity-theoretic notions used to state our containment and hardness consequences. Since the local Hamiltonian problem is naturally a promise problem, we use the corresponding promise-problem formulations of \(\NP\) and \(\QMA\).
Definition 5 (\(\NP\)). A binary promise problem 12 \(A = \left(A_{\mathrm{YES}}, A_{\mathrm{NO}}\right)\) is contained in \(\NP\) if there exist polynomials \(p(n), q(n)\) and a deterministic verifier \(V\) such that on instance \(x \in A_{\mathrm{YES}} \cup A_{\mathrm{NO}}\) with \(|x| = n\):
Completeness: \(x \in A_{\mathrm{YES}} \: \Longrightarrow \: \exists w: |w| = q(n) \text{ and } V(x, w) \text{ outputs } 1 \text{ in } p(n) \text{ time; and}\)
Soundness: \(x \in A_{\mathrm{NO}} \: \Longrightarrow \: \forall w: V(x, w) \text{ outputs } 0 \text{ in } p(n) \text{ time.}\)
In contrast to \(\NP\), the class \(\QMA\) allows the verifier to receive a quantum witness and to perform a quantum verification procedure. This is the natural quantum analogue of \(\NP\) and is the complexity class captured by the general local Hamiltonian problem.
Definition 6 (\(\QMA\)). A promise problem \(A = \left(A_{\mathrm{YES}}, A_{\mathrm{NO}}\right)\) is contained in \(\QMA\) if there exist polynomials \(p(n), q(n), r(n)\) and a uniform family of quantum verifiers \(\{V_n\}\) (than run in \(p(n)\) time) such that on instance \(x \in A_{\mathrm{YES}} \cup A_{\mathrm{NO}}\) with \(|x| = n\):
Completeness: If \(x\) is a yes-instance, i.e. \(x \in A_{\mathrm{YES}}\), then there exists an \(q(n)\)-qubit quantum state \(\ket{\psi}\) such that \[\Pr[V_n\left(\ket{x} \otimes \ket{0}^{\otimes r(n)} \otimes \ket{\psi}\right) \text{ accepts } ] \geq 2/3, \text{and}\]
Soundness: If \(x\) is a no-instance, i.e. \(x \in A_{\mathrm{NO}}\), then for any \(q(n)\)-qubit quantum state \(\ket{\psi}\), \[\Pr[V_n\left(\ket{x} \otimes \ket{0}^{\otimes r(n)} \otimes \ket{\psi}\right) \text{ accepts }] \leq 1/3.\]
We will also use the standard notion of completeness for promise-problem complexity classes. In our setting, completeness is used to formalize the sense in which the local Hamiltonian problem captures the full difficulty of \(\QMA\).
Definition 7 (Completeness). We say that a promise problem \(A = \left(A_{\mathrm{YES}}, A_{\mathrm{NO}}\right)\) is complete for the class \(\mathcal{C}\), notated as \(\mathcal{C}\)-complete if:
\(A \in \mathcal{C}\); and
for any promise problem \(B = \left(B_{\mathrm{YES}}, B_{\mathrm{NO}}\right) \in \mathcal{C}\), there exists a polynomial-time reduction \(f\) such that:
\(x \in B_{\mathrm{YES}} \: \Longrightarrow \: f(x) \in A_{\mathrm{YES}}\); and
\(x \in B_{\mathrm{NO}} \: \Longrightarrow \: f(x) \in A_{\mathrm{NO}}\).
Finally, we record the standard hardness statement for the \(2\)-local Hamiltonian problem in the relative-gap notation used throughout this paper. This result provides the baseline \(\QMA\)-hardness result against which our \(\NP\) containment for almost commuting Hamiltonians should be compared.
Theorem 4 ([48]). The \(\gamma\)-\(2\)-\(\mathrm{LH}\)problem is \(\QMA\)-complete when \(\gamma = O(m^{-c})\) for any \(c > 0\).
Proof. The result shown in [48] is that the problem is \(\QMA\)-complete for some particular \(c\), but a simple gap-amplification argument13 gives the claimed statement. We illustrate this argument with some concrete numbers. Suppose LH is \(\QMA\)-hard for a relative gap of \(\gamma = m^{-3}\), meaning an absolute gap in energy of \(m \gamma\). Then consider a \(k\)-fold amplified Hamiltonian acting on a system of \(kn\) qubits divided into \(k\) groups of \(n\) qubits, given by \(H_k = \sum_{i=1}^{k} (H)_i \otimes I_{\bar{i}}\) . (That is, \(H_k\) is a sum of copies of \(H\) acting on the \(i\)th group of \(n\) qubits, for \(i\) running from \(1\) to \(k\).) This Hamiltonian has \(m' = km\) terms and an absolute energy gap of \(km\gamma\), so the new relative gap is \(\gamma'(m') = m^{-3} = (m'/k)^{-3}\). If we set \(k = m^{99}\)—which gives \(m' = m^{100}\) and \(k = m'^{99/100}\)—then \(m'/k = m'^{0.01}\), so \(\gamma'(m') =(m')^{-0.03}\). This establishes that LH problem for \(\gamma = m^{-0.03}\) is \(\QMA\)-hard as well. ◻
Theorem 5 ([1]). The \(\gamma\)-2-CLH promise problem is contained in \(\NP\) for any admissible14 \(\gamma\).
Proof. Lemma 5 of [1] shows that the problem \(\gamma\)-2-CLH for any value of \(\gamma\) is contained in \(\NP\) if the "commmon eigenspace problem" (CES) for 2-local projectors is contained in \(\NP\). This latter containment is shown in Theorem 3 of [1]. ◻
In this section, we collect the qubit-specific facts that make the pinching step possible. We first define the pinching and snapping operations for single-qubit operators, and then prove the elementary norm bounds that control the errors they introduce. We also isolate the transitivity phenomenon for commuting qubit operators, which is one of the main algebraic features that fails in higher local dimension and is used crucially in our rounding argument.
Definition 8 (Pinching operator). Let \(A \in \mathrm{Herm}(\mathbb{C}^{2})\) be Hermitian with spectral decomposition \[\begin{align} A = \lambda_{\min}(A)\,\Pi + \lambda_{\max}(A)\,(I-\Pi), \end{align}\] where \(\Pi\) and \((I-\Pi)\) are the eigenspace projectors. Then, the pinching operator \(\mathcal{P}_A: \mathrm{L}(\mathbb{C}^{2})\rightarrow \mathrm{L}(\mathbb{C}^{2})\) associated with the eigenspace projectors of \(A\) is defined as \[\begin{align} \mathcal{P}_A(X) = \Pi \, X \, \Pi + (I-\Pi) X (I-\Pi)\, , \quad\quad \text{for } X \in \mathbb{C}^{2 \times 2}. \end{align}\]
Equipped with 8, we now show the following result.
Lemma 2 (Pinching by a Hermitian qubit operator). Let \(A \in \mathrm{Herm}(\mathbb{C}^{2})\) be a Hermitian operator with spectral decomposition given by \[\begin{align} A = \lambda_{\min}(A)\,\Pi + \lambda_{\max}(A)\,(I-\Pi) \end{align}\] with eigenvalues \(\lambda_{\min},\lambda_{\max} \in \mathbb{R}\) and eigenspace projectors \(\Pi\) and \((I-\Pi)\). Let \(\mathcal{P}_A\) be the pinching operator in 8 with respect to \(A\). Then, for any \(B \in \mathbb{C}^{2 \times 2}\), the pinched matrix \(\mathcal{P}_A(B)\) satisfies \[\begin{align} [\mathcal{P}_A(B), A] = 0 \qquad \text{and} \qquad \|B - \mathcal{P}_A(B)\| = \frac{\|[B,A]\|}{\Delta(A)} \,, \end{align}\] where \(\Delta(A) = \lambda_{\max}(A) - \lambda_{\min}(A)\) is the spectral gap of \(A\).
Proof. Both the operator norm and the commutator are invariant under unitary conjugation. Hence, without loss of generality, we may assume that \(A\) is diagonal in its eigenbasis: \[\begin{align} A = \begin{pmatrix} \lambda_{\min}(A) & 0 \\ 0 & \lambda_{\max}(A) \end{pmatrix} \quad \text{ and } \quad \quad \Pi = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}. \end{align}\] Expanding \(B\) in the eigenbasis of \(A\), we get \[\begin{align} B = \begin{pmatrix} B_{1,1} & B_{1,2} \\ B_{2,1} & B_{2,2} \end{pmatrix}. \end{align}\] A direct computation shows that \[\begin{align} [B,A] &= BA - AB \\ &= \bigl(\lambda_{\max}(A) - \lambda_{\min}(A)\bigr) \begin{pmatrix} 0 & B_{1,2} \\ -B_{2,1} & 0 \end{pmatrix} = \Delta(A) \cdot \begin{pmatrix} 0 & B_{1,2} \\ -B_{2,1} & 0 \end{pmatrix}. \end{align}\] By definition of the pinching operator, we have \[\begin{align} \mathcal{P}_A(B) = \begin{pmatrix} B_{1,1} & 0 \\ 0 & B_{2,2} \end{pmatrix}, \end{align}\] which is diagonal in the eigenbasis of \(A\), and hence \([\mathcal{P}_A(B),A]=0\). Moreover, \[\begin{align} B - \mathcal{P}_A(B) = \begin{pmatrix} 0 & B_{1,2} \\ B_{2,1} & 0 \end{pmatrix}. \end{align}\] Next, consider the Pauli-\(Z\) unitary \[\begin{align} Z=\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}. \end{align}\] It is now easy to see that \[\begin{align} B - \mathcal{P}_A(B) = \Delta(A)^{-1}\cdot Z \cdot [B,A]. \end{align}\] Using the unitary invariance of the operator norm with respect to \(Z\), we obtain the equality \[\begin{align} \|B - \mathcal{P}_A(B)\| = \frac{\|Z\cdot [B,A]\|}{\Delta(A)} = \frac{\|[B,A]\|}{\Delta(A)}. \end{align}\] ◻
In this section, we formally introduce the mathematical background for the "snapping technique".
Definition 9 (Snapping operation). The snapping operation is defined as the (nonlinear) map \[\begin{align} \mathcal{S} : \mathrm{Herm}(\mathbb{C}^{2}) \rightarrow \mathrm{Herm}(\mathbb{C}^{2}), \quad\quad X \mapsto \mathcal{S}(X) := \lambda_{\max}(X)\, I. \end{align}\] where \(\lambda_{\max}(X)\) denotes the largest eigenvalue of \(X\).
Lemma 3 (Snapping a Hermitian qubit operator to the identity). Let \(B \in \mathrm{Herm}(\mathbb{C}^{2})\) be any matrix with spectral decomposition \[\begin{align} B = \lambda_{\min}(B)\,\Pi + \lambda_{\max}(B)\,(I-\Pi), \end{align}\] and let \(\mathcal{S}\) denote the snapping operator defined in Definition 9. Then, \[\begin{align} \|B - \mathcal{S}(B)\| = \lambda_{\max}(B) - \lambda_{\min}(B) = \Delta(B) \, , \end{align}\] where \(\Delta(B) = \lambda_{\max}(B) - \lambda_{\min}(B)\) is the spectral gap of \(B\).
Proof. The operator norm is invariant under unitary conjugation. Hence, without loss of generality, we may assume that \(B\) is diagonal in its eigenbasis: \[\begin{align} B = \begin{pmatrix} \lambda_{\min}(B) & 0 \\ 0 & \lambda_{\max}(B) \end{pmatrix}. \end{align}\] By definition of the snapping operation, \[\begin{align} \mathcal{S}(B) = \lambda_{\max}(B)\, I = \begin{pmatrix} \lambda_{\max}(B) & 0 \\ 0 & \lambda_{\max}(B) \end{pmatrix}. \end{align}\] Therefore, \[\begin{align} \mathcal{S}(B) - B = \begin{pmatrix} \lambda_{\max}(B) - \lambda_{\min}(B) & 0 \\ 0 & 0 \end{pmatrix}. \end{align}\] The operator norm of a Hermitian matrix equals the maximum absolute value of its eigenvalues. Consequently, we recover the spectral gap identity, as claimed: \[\begin{align} \|B - \mathcal{S}(B)\| = \lambda_{\max}(B) - \lambda_{\min}(B) = \Delta(B). \end{align}\] ◻
Lemma 4 (Gapped spectra imply transitivity of commutativity). Let \(A,B,C \in \mathrm{Herm}(\mathbb{C}^{2})\) and suppose that \(B\) has non-zero spectral gap \(\Delta(B)=\lambda_{\max}(B) - \lambda_{\min}(B) > 0\). Then, \[[A,B] = 0 \quad \text{ and } \quad [B,C] = 0 \quad \text{ implies } \quad [A,C]=0.\]
Proof. Since \(\Delta(B) > 0\), the matrix \(B\) admits a unique eigenbasis in which it is diagonal. Let \(\{\Pi, \Pi^\perp\}\) be the orthogonal projectors onto the respective eigenspaces. Because \(A\) commutes with \(B\), and \(C\) commutes with \(B\), we can use simultaneous diagonalization (see Fact 1) and the fact15 \(\Delta(B) > 0\) to diagonalize all the three matrices in the unique basis \(\{\Pi, \Pi^\perp\}\) as follows: \[A = a_1 \Pi + a_2 \Pi^\bot\] \[B = b_1 \Pi + b_2 \Pi^\bot\] \[C = c_1 \Pi + c_2 \Pi^\bot\] Using the orthogonality of \(\{\Pi, \Pi^\perp\}\), we then find that \[\begin{align} [A, C] &= \left[a_1 \Pi + a_2 \Pi^\bot, c_1 \Pi + c_2 \Pi^\bot\right]\\ &= a_1c_1 [\Pi, \Pi] + a_1 c_2 [\Pi, \Pi^\bot] + a_2 c_1 [\Pi^\bot, \Pi] + a_2 c_2 [\Pi^\bot, \Pi^\bot] = 0. \end{align}\] ◻
The exact transitivity statement above is useful only after the relevant operators have been made exactly commuting. In the rounding argument, however, we typically know only that two local components almost commute with a common gapped pivot. The following lemma provides the corresponding robust version: if \(A\) and \(C\) each almost commute with a sufficiently gapped qubit operator \(B\), then \(A\) and \(C\) must almost commute with each other.
Lemma 5 (Gapped spectra imply transitivity of almost-commutativity). Let \(A,B,C \in \mathrm{Herm}(\mathbb{C}^{2})\) and suppose that \(B\) has non-zero spectral gap \(\Delta(B)=\Delta(B)=\lambda_{\max}(B) - \lambda_{\min}(B) > \xi\). Then, \[\|[A,B]\| \leq \varepsilon\quad \text{ and} \quad \|[B,C]\| \leq \varepsilon\quad \text{ implies } \quad \|[A,C]\| \leq \frac{2\varepsilon}{\xi}\Big(\|A\| + \|C\| + \frac{\varepsilon}{\xi} \Big) .\] When \(\|A\|\leq 1\), \(\|C\|\leq 1\), and \(\xi \geq \varepsilon>0\), the bound becomes \[\|[A, C]\| \leq \frac{4\varepsilon}{\xi} + \frac{2\varepsilon^2}{\xi^2} \leq \frac{6\varepsilon}{\xi}.\]
Proof. According to 2, there exist (via pinching by \(B\)) \(A'\) and \(C'\) such that \([A', B] = [B, C'] = 0\) and \(\|A - A'\| \leq \|C - C'\| \leq \frac{\varepsilon}{\xi}\). By 4, it holds that \([C', A'] = 0\). Thus, we can bound \(\|[A, C]\|\) as follows: \[\begin{align} \|[A,C]\| & \leq 2 \cdot \|A - A'\| \cdot \|C\| + \|[A', C]\| & \text{via \Cref{lem:transitivity-of-almost-commutatitivty}}\\ &\leq \frac{2\epsilon}{\xi} \cdot \|C\| + \|[C, A']\| & \|A - A'\| \leq \frac{\varepsilon}{\xi} \text{ and } [C,A'] = -[A',C]\\ &\leq \frac{2\epsilon}{\xi} \cdot \|C\| + 2 \cdot \|C - C'\| \cdot \|A'\| + \|[C',A']\| & \text{via \Cref{lem:transitivity-of-almost-commutatitivty}}\\ & \leq \frac{2\epsilon}{\xi} \cdot \|C\| + \frac{2\varepsilon}{\xi} \cdot \|A'\| & \|C - C'\| \leq \frac{\varepsilon}{\xi} \text{ and } [C', A'] = 0\\ & \leq \frac{2\varepsilon}{\xi} \left(\|C\| + \|A\| + \varepsilon/\xi \right) & \|A'\| = \|A\| + \varepsilon/\xi. \end{align}\] ◻
In this section, we develop the local-to-global tools used in the rounding argument. The main point is that approximate commutation of two-qubit Hamiltonian terms can be detected at the level of the single-qubit operators appearing in their local Pauli decompositions. This allows us to translate global commutator bounds into local algebraic constraints, which will later be used to choose pivots, perform snapping, and preserve locality throughout the rounding procedure.
The following simple fact gives a decomposition of a two-qubit operator acting on qubits \(s\) and \(r\) into a sum of tensor product operators. Similar decompositions play a deep role in the theory of commuting Hamiltonians, for instance in Equation (1) of [2].
Lemma 6 (Local Pauli decomposition). Let \(h_{s,r} \in \mathrm{L}(\mathcal{H}_s \otimes \mathcal{H}_r)\) be a linear two-qubit operator acting on the qubits labeled by \(s\) and \(r\). Then, \(h_{s,r}\) can be decomposed as a linear combination of the form \[\label{eqn:local-pauli-decomposition} h_{s,r} = \sum\limits_{\alpha = 0}^{3} A_s^{(\alpha)} \otimes \sigma_r^{(\alpha)}\qquad{(2)}\] where \(\{\sigma_r^{\alpha}\}_{\alpha=0}^3\) are the Pauli matrices on the \(r\)-th qubit, and where \(\{A_s^{(\alpha)}\}_{\alpha=0}^3\) is a ensemble of \(2 \times 2\) complex matrices. Furthermore, the components \(\{A_s^{(\alpha)}\}_{\alpha=0}^3\) are Hermitian if and only if \(h_{s, r}\) is Hermitian.
Proof. Here, we make use of 3; namely, that the Pauli matrices form an orthogonal basis of \(\mathrm{L}(\mathbb{C}^{2})\) Hilbert-Schmidt inner product. Observing that tensor products of Pauli matrices form a basis of the space of linear operators on the tensor system \(\mathbb{C}^{2} \otimes \mathbb{C}^{2}\), we obtain the decomposition \[h_{s,r} = \sum_{\alpha=0}^{3} \sum_{\beta=0}^{3} c_{\alpha, \beta} \, \sigma_s^{(\beta)} \otimes \sigma_r^{(\alpha)} \, .\] Next, we let \(A^{(\alpha)}_s = \sum_{\beta=0}^{3} c_{\alpha, \beta} \, \sigma_s^{(\beta)}\) and show the if and only if statement. First, if \(A^{(\alpha)}_s\) is Hermitian, then its tensor product with a Hermitian Pauli matrix must also be Hermitian, and the sum \(h_{s,r}\) over these tensor products is going to be Hermitian. Second, to show that if \(h_{s,r}\) is Hermitian, then each \(A^{(\alpha)}_s\) is Hermitian, we proceed as follows; first, observe that \[\begin{align} \mathrm{Tr}_{r}\left[\left(I \otimes \sigma_r^{(\alpha)} \right) h_{s,r} \right] &= \mathrm{Tr}_{r} \left[\sum\limits_{\beta = 0}^{3} A_s^{(\beta)} \otimes \sigma_r^{(\alpha)} \sigma_r^{(\beta)}\right] && \text{(by \Cref{eqn:local-pauli-decomposition})}\\ &= \sum\limits_{\beta = 0}^{3} A_s^{(\beta)} \cdot \mathrm{Tr}\left(\sigma_r^{(\alpha)} \sigma_r^{(\beta)}\right) && \text{(by linearity of the trace)}\\ &= \sum\limits_{\beta = 0}^{3} 2\delta_{\alpha, \beta}\;A_s^{(\beta)}&& (\text{by \Cref{fact:pauli-properties}})\\ &= 2 A_s^{(\alpha)}. \end{align}\]
We can similarly compute \(\mathrm{Tr}_{r}\left[ h_{s,r} \left(I \otimes \sigma_r^{(\alpha)} \right)\right] = 2 A_s^{(\alpha)}\). Combining the two, we get \[\label{eqn:A-S-Alpha} A_s^{(\alpha)} = \frac{1}{2} \mathrm{Tr}_{r}\left[\left(I \otimes \sigma_r^{(\alpha)} \right) h_{s,r} \right] = \frac{1}{2} \mathrm{Tr}_{r}\left[ h_{s,r} \left(I \otimes \sigma_r^{(\alpha)} \right)\right].\tag{15}\] Putting everything together, we can verify that \(A_s^{(\alpha)}\) is Hermitian by noting the following. \[\begin{align} \left(A_s^{(\alpha)}\right)^\dagger &= \frac{1}{2} \mathrm{Tr}_{r}\left[\left(I \otimes \sigma_r^{(\alpha)} \right) h_{s,r} \right]^\dagger && \text{by \Cref{eqn:A-S-Alpha}}\\ &= \frac{1}{2} \mathrm{Tr}_{r}\left[ h_{s,r}^\dagger \left(I \otimes \sigma_r^{(\alpha)} \right)^\dagger \right] && \text{"Socks and Shoes" property} \\ &= \frac{1}{2} \mathrm{Tr}_{r}\left[ h_{s,r} \left(I \otimes \sigma_r^{(\alpha)} \right) \right] && \text{ h_{s,r} and \sigma_r^{(\alpha)} are hermitian}\\ &= A_s^{(\alpha)} && \text{by \Cref{eqn:A-S-Alpha}.} \end{align}\] ◻
When working with local Pauli decompositions of two-qubit operators, it will be convenient for us to use the following notion of a gapped decomposition.
Definition 10 (Gapped Pauli decomposition). A two-qubit operator \(h_{s,r} \in \mathrm{Herm}(\mathcal{H}_s \otimes \mathcal{H}_r)\) acting on the qubits labeled by \(s\) and \(r\) is said to be \(\eta\)-gapped on the \(s\)-subsystem (notated as \((s, \eta)\)-gapped) if any of the local components \(\{A_s^{(\alpha)}\}_{\alpha=0}^3\) which appear in the local Pauli decomposition of the form \[h_{s,r} = \sum\limits_{\alpha = 0}^{3} A_s^{(\alpha)} \otimes \sigma_r^{(\alpha)}\] is \(\eta\)-gapped; in other words, there exists a matrix \(A_s^{(\alpha^*)} \in \mathbb{C}^{2 \times 2}\) which is \(\eta\)-gapped such that \(\Delta(A_s^{(\alpha^*)}) \geq \eta\). The property \(\left(r, \eta\right)\)-gapped is defined similarly. We say the operator is \(\eta\)-gapped on both subsystems if it is both \(\left(r, \eta\right)\)-gapped and \(\left(s, \eta\right)\)-gapped.
Let \(h_{s,r}\) and \(h_{s,q}\) be \(2\) Hamiltonian terms on a shared qubit with index \(s\) such that they \(\varepsilon\)-almost commute i.e. \(\|[h_{s,r}, h_{s,q}]\| \leq \varepsilon\). Let their local components on the shared qubit be \(\{A^{(\alpha)}\}\) and \(\{B^{(\beta)}\}\). An important question for our techniques is: what can we say about the commutator of any pair \(\|[A^{(\alpha)}, B^{(\beta)}]\|\)? We will prove in 6 that any pair of local components must also \(\varepsilon\)-almost commute. For that proof, we will use [lem:opnorm-orthog-components].
lemmaOpNormOrthogCompLemma Let \(\{M_i\}_i \subseteq \mathbb{C}^{d_1 \times d_1}\), and let \(\{N_i\}_i \subseteq \mathbb{C}^{d_2 \times d_2}\) be Hermitian binary observables satisfying \[\begin{align} N_i^2 = I_{d_2} \qquad \text{and} \qquad \mathrm{Tr}[N_i N_j] = d_2\,\delta_{i,j}. \end{align}\] Then, any operator of the form \(T = \sum_i M_i \otimes N_i\) satisfies \[\begin{align} \|T\| \geq \|M_i\|, \qquad \text{ for every i.} \end{align}\]
Proof. We compute \[\begin{align} T^\dagger T = \sum_{i,j} M_i^\dagger M_j \otimes N_i N_j, \end{align}\] where we used that each \(N_i\) is Hermitian. Taking the partial trace over the second subsystem and using the Hilbert-Schmidt orthogonality of the \(N_i\)’s gives \[\begin{align} \mathrm{Tr}_2[T^\dagger T] &= \sum_{i,j} M_i^\dagger M_j \, \mathrm{Tr}[N_i N_j] \\ &= d_2 \sum_i M_i^\dagger M_i . \end{align}\] By Fact [fact:op-norm-ptrace], we have \[\begin{align} \|T\|^2 = \|T^\dagger T\| \geq \frac{1}{d_2}\,\bigl\|\mathrm{Tr}_2[T^\dagger T]\bigr\| = \left\|\sum_i M_i^\dagger M_i\right\|. \end{align}\] Since each \(M_j^\dagger M_j\) is positive semidefinite, we have \[\begin{align} \sum_j M_j^\dagger M_j \succeq M_i^\dagger M_i \end{align}\] for every \(i\), and hence \[\begin{align} \left\|\sum_j M_j^\dagger M_j\right\| \geq \|M_i^\dagger M_i\| = \|M_i\|^2 . \end{align}\] Combining the two inequalities yields \(\|T\|^2 \geq \|M_i\|^2\), and therefore \(\|T\| \geq \|M_i\|\). ◻
Theorem 6. Let \(h_{s,r}\) and \(h_{s,q}\) be two \(2\)-qubit linear operators on a shared qubit with index \(s\). According to 6, these can be written as \[h_{s,r} = \sum\limits_{\alpha = 0}^{3} A_s^{(\alpha)} \otimes \sigma_r^{(\alpha)} \quad\quad\quad h_{s,q} = \sum\limits_{\beta = 0}^{3} B_s^{(\beta)} \otimes \sigma_q^{(\beta)}\] for ensembles of \(2 \times 2\) complex matrices \(\{A_s^{(\alpha)}\}_{\alpha=0}^3\) and \(\{B_s^{(\beta)}\}_{\beta=0}^3\). Then, if \(\|[H_{s, r}, H_{s, q}]\| \leq \varepsilon\), for some \(\varepsilon\geq 0\), this implies that \(\|[A_s^{(\alpha)}, B_s^{(\beta)}]\| \leq \varepsilon\), for all \(\alpha, \beta\).
Proof. We can re-write the linear operators with an identity factor on the unaffected qubit, i.e., \[h_{s,r} = \sum\limits_{\alpha = 0}^{3} A_s^{(\alpha)} \otimes \sigma_r^{(\alpha)} \otimes I_{q}\quad\quad\text{ and } \quad\quad h_{s,q} = \sum\limits_{\beta = 0}^{3} B_s^{(\beta)} \otimes I_r \otimes \sigma_q^{(\beta)}.\] Then, we can compute the products \(h_{s,r} h_{s,q}\) and \(h_{s,q} h_{s,r}\) as follows. \[h_{s,r} h_{s,q} = \sum\limits_{\alpha, \beta} A_s^{(\alpha)} B_s^{(\beta)} \otimes \sigma_r^{(\alpha)} \otimes \sigma_q^{(\beta)}\] \[h_{s,q} h_{s,r} = \sum\limits_{\alpha, \beta} B_s^{(\beta)} A_s^{(\alpha)} \otimes \sigma_r^{(\alpha)} \otimes \sigma_q^{(\beta)}\] Then, we can plug these in the definition of the commutator. \[\begin{align} \left[h_{s,r}, h_{s,q}\right] &= h_{s,r} h_{s,q} - h_{s,q} h_{s,r}\\ &= \sum\limits_{\alpha, \beta} \left(A_s^{(\alpha)} B_s^{(\beta)} - B_s^{(\beta)} A_s^{(\alpha)}\right) \otimes \sigma_r^{(\alpha)} \otimes \sigma_q^{(\beta)}\\ &= \sum\limits_{\alpha, \beta} \left[A_s^{(\alpha)}, B_s^{(\beta)} \right] \otimes \left[\sigma_r^{(\alpha)} \otimes \sigma_q^{(\beta)}\right] \end{align}\] Using 3, we can conclude that \(\{\sigma_r^{(\alpha)} \otimes \sigma_q^{(\beta)}\}_{\alpha,\beta}\) forms a set of pairwise orthogonal observables on the tensor product system \(\mathcal{H}_r \otimes \mathcal{H}_q\). Thus, for each \(\alpha, \beta\), Lemma [lem:opnorm-orthog-components] implies that \[\begin{align} \|[A_s^{(\alpha)}, B_s^{(\beta)}]\| \leq \|[H_{s, r}, H_{s, q}]\| \leq \varepsilon. \end{align}\] This proves the claim. ◻
Theorem 7 (Snapping \(2\)-local Hamiltonian terms into \(1\)-local terms). Let \(h_{s,r} \in \mathrm{Herm}(\mathcal{H}_s \otimes \mathcal{H}_r)\) be a two-qubit operator acting qubits \(s\) and \(r\) which is not \((s,\eta)\)-gapped according to 10. Then, there exists a \(1\)-local Hamiltonian Term \(\hat{h}_{r}\) such that: \[\label{eqn:snapped-distance-between-hamiltonian-terms} \|h_{s,r} - \hat{h}_{r}\| \leq 4 \eta.\qquad{(3)}\]
Proof. Using 6, we can expand the two-qubit operator \(h_{s,r}\) as \[\begin{align} h_{s,r} = \sum\limits_{\alpha = 0}^{3} A_{s}^{\alpha} \otimes \sigma_{r}^{(\alpha)} = \sum\limits_{\alpha = 0}^{3} \Big(\lambda_{\max}^{\alpha} \Pi_{s}^{\alpha} + \lambda_{\min}^{\alpha} \left(I - \Pi_{s}^{\alpha}\right)\Big) \otimes \sigma_{r}^{(\alpha)}. \end{align}\] The hypothesis that \(h_{s,r}\) is not \((s,\eta)\)-gapped means that for all \(\alpha\), \(\Delta(A_{s}^{\alpha}) < \eta\). Thus, we can define \(\hat{h}_r\) as the result of snapping all of the matrices \(\{A_s^{\alpha}\}\) into multiples of identity \(\{\hat{A}_s^{\alpha}\}\) as in 3. Let \(\mathcal{S}\) be the snapping operation from 9. Omitting certain identities, we can write \[\begin{align} \hat{h}_r := \sum\limits_{\alpha = 0}^{3} \mathcal{S}\big(A_{s}^{\alpha}\big) \otimes \sigma_{r}^{(\alpha)} = \sum\limits_{\alpha = 0}^{3} \big(\lambda_{\max}\big(A_{s}^{\alpha}\big)I_s\big) \otimes \sigma_{r}^{(\alpha)}\big) =\sum\limits_{\alpha = 0}^{3} \lambda_{\max}\big(A_{s}^{\alpha}\big) \sigma_{r}^{(\alpha)}. \end{align}\] Define \(\hat{A}_s^{\alpha} =\lambda_{\max}\big(A_{s}^{\alpha}\big) I_s\), for \(\alpha=0,1,2,3\). Then, we can calculate the rounding error explicitly: \[\begin{align} \|h_{s,r} - \hat{h}_{r}\| &= \left\|\sum\limits_{\alpha = 0}^{3} \left( A_s^{\alpha} - \hat{A}_s^{\alpha} \right)\otimes \sigma_{r}^{(\alpha)}\right\|\\ &\leq \sum\limits_{\alpha = 0}^{3} \left\|\left( A_s^{\alpha} - \hat{A}_s^{\alpha} \right)\otimes \sigma_{r}^{(\alpha)} \right\| & \text{(triangle inequality)}\\ &\leq \sum\limits_{\alpha = 0}^{3} \left\| A_s^{\alpha} - \hat{A}_s^{\alpha} \right\| \cdot \underbrace{\| \sigma_r^{(\alpha)} \|}_{=1} & (\text{by the properties of } \|\cdot\|)\\ &\leq \sum\limits_{\alpha = 0}^{3} \Delta(A_{s}^{\alpha}) \,\leq\, 4 \eta. \end{align}\] ◻
In this section, we prove the main result of our paper: any almost commuting \(2\)-local Hamiltonian (on qubits) can be mapped to a nearby exactly commuting (qubit) Hamiltonian of the same locality. The proof of our main result uses a technical helper lemma (7), which we formally state and prove later in this section.
Theorem 8 (Algorithmic rounding for almost commuting \(2\)-local Hamiltonians on qubits).
Let \(H = \sum\limits_{I \in \mathcal{I}} h_{I}\) be a \(2\)-local Hamiltonian on \(n\) qubits, where \(\mathcal{I}\) is a
collection of the sets of indices affected by each Hamiltonian term, where \(m = |\mathcal{I}|\) is the total number of terms, and where
each term \(h_{I}\), for \(I \in \mathcal{I}\), is a Hermitian operator that acts as non-identity on at most two qubits (i.e. \(|I| \leq 2\)), of unit norm \(\| h_I \| \leq 1\), and
all terms pair-wise \(\varepsilon\)-almost commute with \(0 < \varepsilon\leq 1\) such that \[\| [h_{I}, h_{J} ] \| \leq \varepsilon, \quad\quad \forall I, J \in \mathcal{I}.\]
Given a description of \(H\), it is possible to compute in classical deterministic time \(O(m)\)16 the description of a nearby exactly commuting Hamiltonian \(\hat{H} = \sum\limits_{I \in \mathcal{I}} \hat{h}_{I}\) such that
\(\hat{H}\) is \(2\)-local, thereby preserving the locality of the Hamiltonian \(H\),
\(\hat{H}\) is a qubit Hamiltonian, thereby preserving the local dimension of \(H\),
all of the terms in \(\hat{H}\) pairwise commute such that \[\begin{align} [\hat{h}_{I}, \hat{h}_{J}] &= 0, \quad\quad \forall I, J \in \mathcal{I}, \label{eq:exact-commutation} \end{align}\qquad{(4)}\]
all of the terms in \(\hat{H}\) are (point-wise) nearby in the sense that \[\begin{align} \| \hat{h}_{I} - h_{I} \| \leq 216\;\varepsilon^{1/6}, \quad\quad \forall I \in \mathcal{I}, \text{ and}\label{eq:overall-rounding-term-error} \end{align}\qquad{(5)}\]
\(\hat{H}\) is overall close to \(H\) in operator norm such that \[\begin{align} \|\hat{H} - H\| \leq 216\;m \;\varepsilon^{1/6}.\label{eq:rounding-error} \end{align}\qquad{(6)}\]
Proof. We remark that the statement of the theorem allows the Hamiltonian to have terms that have locality strictly less than \(2\). For convenience, we assume that the Hamiltonian is of the form \(H = \sum_{(i,j) \in E} h_{i,j}\) so that all terms in \(H\) are formally two-local. This avoids additional bookkeeping and is purely for clarity of the exposition (it does not materially affect any of the arguments). The ordering of the two indices on the Hamiltonian term is irrelevant, so we will freely write \(h_{i,j}\) or \(h_{j,i}\) for the same term as convenient.
Our rounding procedure generates the Hamiltonian \(\hat{H}\) as follows. We will have two stages of snapping with gap parameters \(\eta_2\) in the first stage and \(\eta_1\) in the second stage (note that the index is counting down). Similarly, the commutator norm will be bounded by \(\varepsilon_2\) in the first stage and \(\varepsilon_1\) in the second stage (with the index counting down as well).
Define sets of terms \(T_2, T_1, T_0\) that will track of 2-local, 1-local, and 0-local terms, respectively, through the snapping process. To start out, let \(T_2\) contain all the terms in \(H\), and let \(T_1\) and \(T_0\) be empty.
Let \(\varepsilon_2 = \varepsilon\).
Snapping \(2\)-local terms. Let \(\eta_2 := \varepsilon_2^{1/3}\). For every term \(h_{i, j}\) in \(T_2\):
If \(h_{i, j}\) is \(\eta_2\)-gapped on both subsystems according to 10 (i.e. (\(i, \eta_2\))-gapped and (\(j, \eta_2\))-gapped), remove it from \(T_2\) and place it in \(H^{(\mathrm{snap})}_2\).
Else, pick the qubit \(j\) (WLOG) such that \(h_{i, j}\) is not \((j, \eta_2)\)-gapped. Snap using 7 into a \(1\)-local term on the subsystem \(i\) to obtain \(h'_{i,j}\) as below and place \(h'_{i,j}\) in \(T_1\). \[h'_{i,j} = g_i \otimes I_j \quad\quad \text{ where }\quad\quad \| h'_{i,j} - h_{i,j} \| \leq 4\eta_2.\]
Snapping \(1\)-local terms. Let \(\eta_1 := \sqrt{\varepsilon_2 + 16\eta_2}\). For each term \(h'_{i,j}\) in \(T_1\) (\(1\)-local terms), perform the following.
If \(h'_{i,j}\) is \((i, \eta_1)\)-gapped, place the term into \(H^{(\mathrm{snap})}_1\).
Else, snap that term into a multiple of the identity \(h"_{i,j} := c I\) and place that term into \(T_0\). \[\|h"_i - h'_i\| \leq 4 \eta_1.\]
Move every term in \(T_0\) to \(H^{(\mathrm{snap})}_0\).
We now have: \[H^{(\mathrm{snap})}= H^{(\mathrm{snap})}_2 + H^{(\mathrm{snap})}_1 + H^{(\mathrm{snap})}_0\] where:
Spectral gap:
Every term \(h_{i,j}^{(\mathrm{snap})}\) in \(H^{(\mathrm{snap})}_2\) is \(\eta_2\)-gapped on both subsystems \(i\) and \(j\) according to 10.
Every term \(h_{i,j}^{(\mathrm{snap})}\) in \(H^{(\mathrm{snap})}_1\) is \(\eta_1\)-gapped (according to 10) on the subsystem acted upon nontrivially.
Every term \(h_{i,j}^{(\mathrm{snap})}\) in \(H^{(\mathrm{snap})}_0\) is proportional to the identity (zero spectral gap).
Rounding error:
Every term \(h^{(\mathrm{snap})}_{i,j}\) in \(H^{(\mathrm{snap})}_2\) is identical to the corresponding term \(h_{i,j}\) in \(H\).
For every term \(h^{(\mathrm{snap})}_{i,j}\) in \(H^{(\mathrm{snap})}_1\), we have \[\label{eqn:distance-snapped-once} \| h^{(\mathrm{snap})}_{i,j} - h_{i,j} \| \leq 4\eta_2.\tag{16}\] This is because every term in \(H^{(\mathrm{snap})}_1\) was obtained by one application of snapping with gap parameter \(\eta_2\).
For every term \(h^{(\mathrm{snap})}_{i,j}\) in \(H^{(\mathrm{snap})}_0\), we have \[\|h^{(\mathrm{snap})}_{i,j} - h_{i,j}\| \leq 4\eta_2 + 4\eta_1.\] This is because every such term was obtained from snapping an original two-local term twice, first with gap parameter \(\eta_2\) and then with gap parameter \(\eta_1\).
Comutativity error: Let \(\varepsilon_1 := \varepsilon+ 16\eta_2\).
\(H^{(\mathrm{snap})}_2\) contains \(2\)-local terms such that each pair of terms \(\varepsilon_2\)-commute.
\(H^{(\mathrm{snap})}_1\) contains \(1\)-local terms such that each pair of terms \(\varepsilon_1\)-commute. Let \(h^{(\mathrm{snap})}_{i, j}\) and \(h^{(\mathrm{snap})}_{i, k}\) be two terms in \(H^{(\mathrm{snap})}_1\) that overlap on exactly one qubit. We will use [lem:transitivity-of-almost-commutatitivty] to bound the norm of their commutator. \[\begin{align} \|[h^{(\mathrm{snap})}_{i, j}, h^{(\mathrm{snap})}_{i, k}]\| & \leq 2 \|h^{(\mathrm{snap})}_{i, j} - h_{i, j}\| \cdot \|h^{(\mathrm{snap})}_{i, k}\| + \|[h_{i, j}, h^{(\mathrm{snap})}_{i, k}]\| & \text{\Cref{lem:transitivity-of-almost-commutatitivty}}\\ & \leq 2 \cdot 4 \cdot \eta_2 \cdot 1 + \|[h^{(\mathrm{snap})}_{i, k}, h_{i, j}]\| & \text{Ineq.~\ref{eqn:distance-snapped-once}}\\ & \leq 8 \eta_2 + 2 \|h^{(\mathrm{snap})}_{i, k} - h_{i, k}\| \cdot \|h_{i, j}\| + \|[h_{i, k}, h_{i,j}]\|& \text{\Cref{lem:transitivity-of-almost-commutatitivty}}\\ & \leq 8 \eta_2 + 2 \cdot 4 \cdot \eta_2 \cdot 1 + \varepsilon& \text{Ineq.~\ref{eqn:distance-snapped-once}}\\ & = \varepsilon+ 16 \eta_2 = \varepsilon_1. \end{align}\]
Any term in \(H^{(\mathrm{snap})}_2\) \(\varepsilon_1\)-commutes with any term in \(H_1\). Recall that terms in \(H^{(\mathrm{snap})}_2\) are \(2\)-local and terms in \(H_1\) are \(1\)-local. Their commutator is zero possibly unless they overlap on the qubit affected by the \(1\)-local term. Let \(h^{(\mathrm{snap})}_{i, j} \in H^{(\mathrm{snap})}_2\) and \(h^{(\mathrm{snap})}_{i,k} \in H_1\). Note that \(h^{(\mathrm{snap})}_{i,j} = h_{i,j}\). \[\begin{align} \|[h^{(\mathrm{snap})}_{i,k}, h^{(\mathrm{snap})}_{i, j}]\| &= \| [ h^{(\mathrm{snap})}_{i,k}, h_{i,j} ] \| \\ & \leq 2 \cdot \|h^{(\mathrm{snap})}_{i,k} - h_{i, k}\| \cdot \|h_{i, j}\| + \|[h_{i, k}, h_{i, j}]\| & \text{\Cref{lem:transitivity-of-almost-commutatitivty}}\\ & \leq 2 \cdot 4 \cdot \eta_2 \cdot 1 + \varepsilon& \text{Ineq.~\ref{eqn:distance-snapped-once}}\\ & = \varepsilon+ 8 \eta_2 \leq \varepsilon_1. \end{align}\]
Pivot selection. For each qubit \(i \in [n]\), assign it a pivot operator \(R_i\) as follows.
If qubit \(i\) is affected by at most one non-identity Hamiltonian term in \(H^{(\mathrm{snap})}\), let \(R_i\) be the one-qubit identity operator.
Otherwise, there are \(2\) subcases:
At least one of the terms \(h^{(\mathrm{snap})}_{i,j}\) in \(H_1^{(\mathrm{snap})}\) acts nontrivially on \(i\). This term is \(1\)-local: \(h^{(\mathrm{snap})}_{i,j} = g_i \otimes I_j\) for some \(g_i\). In this case, set \(R_i = g_i\).
All of the terms in \(H^{(\mathrm{snap})}\) acting nontrivially on \(i\) are \(2\)-local: in this case, pick an arbitrary one of these terms \(h^{(\mathrm{snap})}_{ij}\) (e.g. the one with the lexicographically first index pair \(i,j\)). By the assumption athat \(h^{(\mathrm{snap})}_{ij} \in H^{(\mathrm{snap})}_2\), it must be \(\eta_2\)-gapped on both systems \(i\) and \(j\). So writing its Pauli decomposition as \[h^{(\mathrm{snap})}_{ij} = \sum_{\alpha = 0}^{3} A^\alpha_i \otimes \sigma^\alpha_j,\] we let \(R_i\) be any of the operators \(A^\alpha_i\) that has spectral gap at least \(\eta_2\).
We claim that for each qubit \(i \in [n]\) there exists a choice of parameters \(\kappa_i, \zeta_i\) such that the following hold.
For any Hamiltonian term \(h^{(\mathrm{snap})}_{i,j} \in H^{(\mathrm{snap})}\), \[\|[ h^{(\mathrm{snap})}_{i,j}, R_i \otimes I_j] \| \leq \kappa_i,\] and likewise with \(i\) and \(j\) interchanged.
For each \(i\), either \(R_i\) is identity or the spectral gap of \(R_i\) is at least \(\zeta_i\).
For each \(i\), \(\kappa_i/\zeta_i \leq \max\{ \varepsilon_1 /\eta_1, 24\varepsilon_2/\eta_2^2\}\).
In this case, the algorithm above sets \(R_i = I\). Let \(\kappa_i = 0\) and \(\zeta_i = 1\). The three properties hold.
Within this case, there are two subcases.
In this case, the procedure above sets \(R_i\) to be equal to (the nontrivial tensor factor of) some such 1-local term \(h^{(\mathrm{snap})}_{i,j}\). Let \(\kappa_i\) be equal to \(\varepsilon_1\) and \(\zeta_i = \eta_1\). We know that the term \(h^{(\mathrm{snap})}_{i,j}\) has commutativity error \(\varepsilon_1\) with all other terms in \(H^{(\mathrm{snap})}\) and has spectral gap at least \(\eta_1\), so the three properties hold.
In this case, the procedure above will take \(R_i\) to be some operator from the local decomposition of a term \(h^{(\mathrm{snap})}_{i,k}\). We will set \(\kappa_i = 24\varepsilon_2/\eta_2\) and \(\zeta_i = \eta_2\). This setting automatically satisfies the third property.
To see that the properties hold with these parameters, let the decomposition of \(h^{(\mathrm{snap})}_{i,k}\) be \[h^{(\mathrm{snap})}_{i,k} = \sum_{\beta=0}^3 B_i^\beta \otimes \sigma_k^\beta.\] Let \(\beta^*\) be such that \(R_i = B_i^{\beta^*}\). By construction, we know that \(\beta^*\) was chosen so that the spectral gap of \(R_i = B_i^{\beta^*}\) is at least \(\eta_2\), which establishes the second property.
We now show the first property. Let \(h^{(\mathrm{snap})}_{i,j}\) be a Hamiltonian term acting on qubit \(i\). Now, suppose \(j \neq k\). Then decompose \(h^{(\mathrm{snap})}_{i,j}\) as \[h^{(\mathrm{snap})}_{i,j} = \sum_{\alpha=0}^3 A_i^\alpha \otimes \sigma_j^\alpha.\] Since \(\|[h^{(\mathrm{snap})}_{i,j},h^{(\mathrm{snap})}_{i,k}]\| \leq \varepsilon_2\), we can conclude by applying 6 that for each \(\alpha\): \[\| [A_i^\alpha, R_i] \| \leq \varepsilon_2, \label{eq:pivot-commutes-different-term-2}\tag{17}\] and therefore \[\| [h^{(\mathrm{snap})}_{i,j}, R_i \otimes I_j ] \| \leq 4 \varepsilon_2 \leq 24\varepsilon_2/\eta_2,\] under the assumption that \(\eta_2 \leq 6\).
Now, suppose \(j = k\). In this case, we are going to use transitivity (5) to obtain our conclusion. Pick \(j' \neq k\) such that \(h^{(\mathrm{snap})}_{i,j'}\) acts nontrivially on qubit \(i\). (We are guaranteed that such a \(j'\) exists by the assumption that we are in Case 2.) Such Hamiltonian term has the decomposition \[h^{(\mathrm{snap})}_{i,j'} = \sum_{\alpha=0}^3 A_i^\alpha \otimes \sigma_{j'}^\alpha.\] By 17 , we know that for each \(\alpha\), \(\| [A_i^\alpha, R_i]\| \leq \varepsilon_2.\) Now, let \(B_i^\beta\) be an operator from the decomposition of \(h^{(\mathrm{snap})}_{i,k}\). Since \(\| [h^{(\mathrm{snap})}_{i,k}, h^{(\mathrm{snap})}_{i,j'}] \| \leq \varepsilon_2\), we can conclude by 6 that for any \(\alpha\): \[\| [ B_i^\beta, A_i^\alpha] \| \leq \varepsilon_2.\]
Furthermore, by the fact that we chose \(h_{ij'}\) to act nontrivially on qubit \(i\), we know that it is \(\eta_2\)-gapped on qubit \(i\), and therefore that there exists an \(\alpha^*\) such that \(\Delta(A_i^{\alpha^*}) \geq \eta_2\).
Now, we will use transitivity: we know that \(\|[B_i^\beta, A_i^{\alpha^*}]\| \leq \varepsilon_2\) and \(\|[A_i^{\alpha^*}, R_i]\| \leq \varepsilon_2\), so by 5, we can conclude that \[\| [B_i^\beta, R_i] \| \leq \frac{6\varepsilon_2}{\Delta(A_i^{\alpha^*})} \leq \frac{6 \varepsilon_2}{\eta_2},\] where we are assuming that \(\varepsilon_2 \leq \eta_2\) and moreover that the terms of the Hamiltonian have operator norm at most \(1\). So, we have \[\| [h^{(\mathrm{snap})}_{i,k}, R_i \otimes I_k ] \| \leq \frac{24\varepsilon_2}{\eta_2}.\]
Pinch everything. Define the global pinching map \(\mathcal{P}\) that pinches each qubit \(i\) by \(R_i\). Our final Hamiltonian will be \[\widehat{H} = \mathcal{P}(H^{(\mathrm{snap})}).\] By 7, we conclude that the resulting Hamiltonian \(\widehat{H}\) is commuting, and that for each term \(\widehat{h}_{i,j}\) in \(\widehat{H}\), its distance from the corresponding term \(h^{(\mathrm{snap})}_{i,j}\) in \(H^{(\mathrm{snap})}\) is bounded by \[\|\hat{h}_{i,j} - h^{(\mathrm{snap})}_{i,j} \| \leq 4\max_{i,j} \left\{ \left(\frac{\kappa_i}{\zeta_i} + \frac{\kappa_j}{\zeta_j} \right) \right\} \leq 8 \max\left\{ \frac{\varepsilon_1}{\eta_1}, \frac{24\varepsilon_2}{\eta_2^2} \right\} \leq 192\;\varepsilon^{1/6},\] where the final inequality follows from the parameter settings we have made: \[\begin{align} \varepsilon_2 &= \varepsilon,\\ \varepsilon_1 &= \varepsilon+ 16\;\eta_2 = \varepsilon+ 16\;\sqrt[3]{\varepsilon},\\ \eta_2 &= \sqrt[3]{\varepsilon}, \text{and}\tag{18}\\ \eta_1 &= \sqrt{\varepsilon_1} = \sqrt{\varepsilon+ 16\;\sqrt[3]{\varepsilon}} \leq 5 \varepsilon^{1/6}.\tag{19} \end{align}\]
For each input Hamiltonian term \(h_{i,j}\), we compute an upper bound on its distance from the output term \(\hat{h}_{i,j}\). By the triangle inequality, there are two distances to add: (1) the distance \(\|h^{(\mathrm{snap})}_{i,j} - \hat{h}_{i,j}\|\), which we showed above is bounded by \(192\;\varepsilon^{1/6}\), and (2) the distance \(\|h_{i,j} - h^{(\mathrm{snap})}_{i,j} \|\), which we bounded earlier by \(4 (\eta_2 + \eta_1)\). Thus, the total distance is bounded above as follows. \[\begin{align} \|\hat{h}_{i,j} - h_{i,j}\| &\leq \|\hat{h}_{i,j} - h^{(\mathrm{snap})}_{i,j}\| + \|h^{(\mathrm{snap})}_{i,j} - h_{i,j}\|\\ & \leq 192\;\varepsilon^{1/6} + 4 \eta_2 + 4 \eta_1\\ & \leq 192\;\varepsilon^{1/6} + 4 \sqrt[3]{\varepsilon} + 4 \cdot 5 \varepsilon^{1/6} & \text{Ineq.~\ref{ineq:eta952} and Ineq.~\ref{ineq:eta951}}\\ & \leq 216\;\varepsilon^{1/6}. \end{align}\] From this, the total operator norm bound \[\|\hat{H} - H \| \leq 216 m \varepsilon^{1/6}\] follows directly by applying the triangle inequality \(m\) times.
The fact that the runtime is linear in \(m\) follows by inspecting the algorithm. ◻
Lemma 7 (The multi-qubit pinching lemma). Let \(H = \sum_{(i,j) \in E} h_{ij}\) be a 2-local Hamiltonian and for each \(i \in [n]\), let \(\mathcal{P}_i\) be either the identity superoperator or the pinching superoperator for some one-local operator \(R_i\) acting on qubit \(i\). Suppose that for each \(i\) where \(\mathcal{P}_i\) is not identity, \(\Delta(R_i) \geq \eta_i\) and for all \(j\), \[\|[R_i \otimes I_j, h_{i,j} ] \| \leq \kappa_i,\] for some parameters \(\eta_i, \kappa_i\). Then the 2-local Hamiltonian \[\label{eqn:definition-of-H-prime} H' = \sum_{(i,j) \in E} (\mathcal{P}_i \otimes \mathcal{P}_j \otimes \mathrm{id}_{[n]\setminus \{i,j\}})( h_{i,j})\qquad{(7)}\] satisfies the following properties:
For all \(i\) such that \(\mathcal{P}_i\) is not identity, all the terms \(h'_{i,j}\) touching qubit \(i\) commute with each other, and with \(R_i\).
For all \((i,j) \in E\), \[\| h'_{i,j} - h_{i,j} \| \leq 4 \left(\frac{\kappa_i}{\eta_i} + \frac{\kappa_j}{\eta_j}\right). \label{eq:cheese-rounding-error}\qquad{(8)}\]
Proof. We show the two properties in turn.
Commutativity. We only need to check commutativity for pairs of terms which overlap on exactly one qubit (there are no two terms that overlap on two qubits since our convention17 is that \(h_{i,j}\) is the sole term in the Hamiltonian acting on the pair \(i,j\)), and that were affected nontrivially by the pinching on the shared qubit. Let \(\{i, j, k\}\) be three distinct indices. Consider the terms \(h_{i,j}\) and \(h_{j,k}\) which have the following decomposition according to 6.
\[\label{eqn:extra-cheese-decomp} h_{i,j} = \sum\limits_{\alpha = 0}^3 \sigma^\alpha_i \otimes A_j^\alpha \quad\quad\quad\quad h_{j,k} = \sum\limits_{\beta = 0}^3 B_j^\beta \otimes \sigma^\beta_k\tag{20}\]
Now, consider the commutator \([h'_{i,j}, h'_{j,k}]\). \[\begin{align} [h'_{i,j}, h'_{j,k}] &= [ (\mathcal{P}_i \otimes \mathcal{P}_j)(h_{i,j}), (\mathcal{P}_j \otimes \mathcal{P}_k)(h_{j,k}) ] & \text{by \Cref{eqn:definition-of-H-prime}}\\ &= \left[ \sum_{\alpha} (\mathcal{P}_i \otimes \mathcal{P}_j)(\sigma^\alpha_i \otimes A_j^\alpha), \sum_{\beta} (\mathcal{P}_j \otimes \mathcal{P}_k)(B_j^\beta \otimes \sigma^\beta_k) \right ] & \text{by \Cref{eqn:extra-cheese-decomp}}\\ &= \sum_{\alpha,\beta} \mathcal{P}_i(\sigma_i^\alpha) \otimes \underbrace{[\mathcal{P}_j(A^\alpha_j), \mathcal{P}_j(B^\beta_j)]}_{=0} \otimes \mathcal{P}_k(\sigma_k^\beta) & \text{by Commutator Properties}\\ &= 0. \end{align}\] To see that the commutators in the sum are \(0\), observe that by 2, each \(\mathcal{P}_j(A_j^\alpha)\) and \(\mathcal{P}_j(B_j^\beta)\) commutes with \(R_j\), and thus by 4 and the fact that \(R_j\) is gapped, we get that \(\mathcal{P}_j(A_j^\alpha)\) and \(\mathcal{P}_j(B_j^\beta)\) commute with each other. From this calculation it is also evident that each \(h'_{i,j}\) commutes with \(R_i\).
Rounding error. To bound the rounding error, we will first show a commutativity property of the operators \(R_i\) for every qubit where they are defined. Consider such a qubit \(i\) and let \(h_{i,j}\) be a Hamiltonian term acting on qubit \(i\). Decompose \(h_{i,j}\) as \[} h_{i,j} = \sum_{\alpha=0}^3 A_i^\alpha \otimes \sigma_j^\alpha.\] Since, by the hypothesis, \(\|[h_{i,j},(R_i \otimes I_j) ]\| \leq \kappa_i\), we can conclude by applying 6 that for each \(\alpha\): \[\| [A_i^\alpha, R_i] \| \leq \kappa_i. \label{eq:R-commutator}\tag{21}\]
Now, we can compute the rounding error of any Hamiltonian term. Let \(h_{i,j}\) be any term of the Hamiltonian. If both \(\mathcal{P}_i\) and \(\mathcal{P}_j\) are equal to identity, then there is nothing to prove.
Now, suppose without loss of generality that qubit \(i\) has \(\mathcal{P}_i\) not equal to identity, so \(R_i\) is defined. Then we obtain \[\begin{align} \| \mathcal{P}_i(h_{i,j}) - h_{i,j} \| &= \| (\sum_{\alpha =0}^3 \mathcal{P}_i(A_i^\alpha) - A_i^\alpha) \otimes \sigma_j^\alpha \| \\ &\leq \sum_{\alpha =0}^3 \| \mathcal{P}_i(A_i^\alpha) - A_i^\alpha\| \\ &\leq \frac{1}{\Delta(R_i)} \sum_{\alpha =0}^3 \|[A_i^\alpha, R_i] \| \\ &\leq \frac{4}{\Delta(R_i)} \cdot \kappa_i \leq \frac{4 \kappa_i}{\eta_i}, \end{align}\] where in the second to last line we applied 2 and 21 . Now, if \(\mathcal{P}_j\) is equal to identity, then \(h'_{i,j} = \mathcal{P}_i(h_{i,j})\), so we have shown ?? in this case.
The remaining case is if \(\mathcal{P}_j\) is also not equal to identity. In this case, write the decomposition \[h_{i,j} = \sum_{\alpha=0}^{3} \sigma_i^\alpha \otimes C_j^\alpha.\] We can similarly derive the bound \[\begin{align} \| (\mathcal{P}_i \otimes \mathcal{P}_j)(h_{i,j}) - \mathcal{P}_i(h_{i,j}) \| &= \| \sum_{\alpha =0}^3 (\mathcal{P}_j(C_j^\alpha) - C_j^\alpha) \otimes \mathcal{P}_i(\sigma_i^\alpha) \| \\ &\leq \sum_{\alpha =0}^3 \| (\mathcal{P}_j(C_j^\alpha) - C_j^\alpha) \| \\ &\leq \frac{1}{\Delta(R_j)} \sum_{\alpha =0}^3 \| [C_j^\alpha, R_j] \| \\ &\leq \frac{4\kappa_j}{\eta_j} & \text{by \Cref{eq:R-commutator} and } \Delta(R_j) \geq \eta, \end{align}\] where we have used the bound \(\| \mathcal{P}_i(\sigma_i^\alpha) \| \leq \| \sigma_i^\alpha \| = 1\), which follows from the fact that \(\mathcal{P}_i\) is a positive unital map and thus contractive in operator norm (see [49]). So overall, by the triangle inequality, we get \[\begin{align} \| h_{i,j} - (\mathcal{P}_i \otimes \mathcal{P}_j)(h_{i,j}) \| &\leq \| h_{i,j} - \mathcal{P}_i(h_{i,j}) \| + \| \mathcal{P}_i(h_{i,j}) - (\mathcal{P}_i \otimes \mathcal{P}_j)(h_{i,j}) \| \\ &\leq \frac{4\kappa_i}{\eta_i} + \frac{4\kappa_j}{\eta_j}. \end{align}\] This proves ?? .
◻
In this section, we use our locality-preserving rounding technique (formally, 8 ) to show that the almost commuting \(2\)-local Hamiltonian problem lies in \(\mathsf{NP}\).
Theorem 9. There exists a linear-time computable reduction from the \((\gamma, \varepsilon)\)-\(2\)-\(\mathrm{ACLH}\) problem to the \((\gamma')\)-\(2\)-\(\mathrm{CLH}\) where \(\gamma' = \gamma - 432\;\varepsilon^{1/6}\) for any \(0 \leq \varepsilon\leq 1\).
Proof. Given \((H,a,b)\) an instance of \((\gamma,\varepsilon)\)-2-ACLH, let \(H'\) be the commuting Hamiltonian obtained by applying 8 to \(H\), and let \(a' = a + 216m\varepsilon^{1/6}\) and \(b' = b - 216m\varepsilon^{1/6}\). From the operator norm bound in the theorem, together with 2, we know that \[|\lambda_{\min}(H') - \lambda_{\min}(H)| \leq 216 m \varepsilon^{1/6}.\]
Hence, we have \[\begin{align} \lambda_{\min}(H) \leq a &\Longrightarrow \lambda_{\min}(H') \leq a' \\ \lambda_{\min}(H) \geq b &\Longrightarrow \lambda_{\min}(H') \geq b'. \end{align}\] Thus, since \(\gamma' \leq (b'-a')/m\), it holds that \((H',a',b')\) is always an instance of \((\gamma')\)-2-CLH satisfying the promise for \(\gamma' = \gamma - 432\varepsilon^{1/6}\), and \(H'\) is a YES instance iff \(H\) is a YES instance, so the map \(H \mapsto H'\) is a reduction as claimed. ◻
Corollary 1. The \((\gamma, \varepsilon)\)-\(2\)-\(\mathrm{ACLH}\) promise problem is in \(\NP\) when \(\gamma - 432\varepsilon^{1/6} \geq 1/\poly(n)\).
As an application of our locality-preserving rounding technique for almost commuting quantum many-body Hamiltonians, we now consider the task of quantum Gibbs sampling. For a local Hamiltonian \(H\) and an inverse temperature \(\beta > 0\), the Gibbs state \[\begin{align} \label{eq:Gibbs-state} \rho_\beta(H) = \frac{e^{-\beta H}}{\mathrm{Tr}\left[e^{-\beta H}\right]} \end{align}\tag{22}\] describes the thermal equilibrium properties of a quantum system at finite temperature \(T=1/\beta\). Given a precision parameter \(\delta >0\), the \((H,\beta,\delta)\)-Gibbs state preparation (or sampling) task with respect to the Hamiltonian \(H\) and an inverse temperature \(\beta > 0\) is to output \(\rho\) such that \[\begin{align} \| \rho - \rho_\beta(H) \|_1 \leq \delta. \end{align}\]
Our rounding technique allows to reduce quantum Gibbs sampling for \(\varepsilon\)-almost-commuting \(2\)-local qubit Hamiltonians to the task of Gibbs sampling for a nearby commuting \(2\)-local qubit Hamiltonians, provided that \(\varepsilon\) is sufficiently small.
We use the following result on the continuity of the Gibbs state (with respect to the Hamiltonian) which is implicit in [50].
Proposition 1 (Continuity of the Gibbs state, [50]). Let \(H,\hat{H}\) be Hermitian operators acting on a finite-dimensional complex vector space. Then, for any inverse temperature \(\beta > 0\), \[\| \rho_\beta(H) - \rho_\beta(\hat{H})\|_1 \, \leq \, e^{2 \beta \| H - \hat{H} \|} -1.\] In particular, if \(\|H-\hat{H}\| \leq \ln(1+\delta)/2\beta\), then it holds that \(\|\rho_\beta(H) - \rho_\beta(\hat{H})\|_1 \leq \delta\).
Equipped with the above technical fact, we can now show the following reduction.
Theorem 10. Let \(H = \sum_{i=1}^m h_i\) be an \(\varepsilon\)-almost-commuting \(2\)-local qubit Hamiltonian with \(\| [h_i,h_j]\| \leq \varepsilon\), for all \(i,j\). Then, for any inverse temperature \(\beta >0\) and precision \(\delta >0\) such that \[\begin{align} \label{eq:paramrters} 216 m \varepsilon^{1/6} \leq \ln\Big(1+\frac{\delta}{2} \Big)/2\beta \end{align}\qquad{(9)}\] there exists a reduction from the task of \((H,\beta,\delta)\)-Gibbs sampling to the task of \((\hat{H},\beta,\delta/2)\)-Gibbs sampling for a \(2\)-local commuting qubit Hamiltonian \(\hat{H}\). Moreover, if the Gibbs sampler for \(\hat{H}\) runs in time \(T\), then the resulting Gibbs sampler for \(H\) runs in time \(T + O(m)\).
Proof. The reduction simply applies the rounding technique from 8 to \(H\), resulting in a \(2\)-local commuting qubit Hamiltonian \(\hat{H}\) such that \(\| H - \hat{H} \| \leq 216 m \varepsilon^{1/6}\). Then, the output of any successful \((\hat{H},\beta,\delta/2)\)-Gibbs sampler results in a state \(\rho\) such that \[\begin{align} \| \rho - \rho_\beta(H) \|_1 &\leq \| \rho - \rho_\beta(\hat{H}) \|_1 + \| \rho_\beta(\hat{H}) - \rho_\beta(H) \|_1 && (\text{triangle inequality})\\ &\leq \frac{\delta}{2} + \| \rho_\beta(\hat{H}) - \rho_\beta(H) \|_1 && (\text{by assumption})\\ &\leq \frac{\delta}{2} + e^{2 \beta \| H - \hat{H} \|} -1 && (\text{\Cref{prop:continuity}})\\ &\leq \frac{\delta}{2} + \frac{\delta}{2} = \delta && (\text{due to~\eqref{eq:paramrters}}) \end{align}\] Because the rounding step is deterministic and requires time \(O(m)\), the claim follows. ◻
We remark that our Gibbs sampling reduction for almost-commuting Hamiltonians above can be further combined with the reduction of [38], thereby reducing Gibbs sampling for (certain) almost-commuting \(2\)-local qubit Hamiltonians to Gibbs sampling of certain classical Hamiltonians.
Our result gives a method to speed up Hamiltonian simulation for approximately commuting Hamiltonians. The basic idea is to use the fact that time evolution of commuting Hamiltonians can be simulated very efficiently, since the matrix exponential factors into a product of exponentials of the individual terms. For short times, thus, one could simply round an approximately commuting Hamiltonian \(H\) to a commuting Hamiltonian \(H'\) with our technique, and simulate \(H'\) instead of \(H\). For longer times, the error incurred by this rounding may be prohibitive: for this more general case, we use can use the "interaction picture" formalism of Low and Wiebe [43], in essentially a black-box way, to add corrections from the rounding error.
As a first step, we show the following helper lemma which is essentially folklore.
Lemma 8. Suppose \(H = \sum_{i=1}^{m} h_i\) is an \(O(1)\)-local commuting Hamiltonian on \(n\) qubits, with \(m = \Omega(n)\), and \(\delta > 0\). Then there exists a unitary quantum circuit on \(n\) qubits of gate complexity \[O\Big(m \, \poly\big(\log(m/\delta), \log t\big)\Big)\] that implements a unitary \(U\) such that \[\|U - e^{iHt} \|_\infty \leq \delta.\] Moreover, this circuit can be computed form a classical description of \(H\) and \(t\) in classical time scaling as \(O(m \poly(\log\frac{1}{m\delta}, \log t))\).
Proof. Using the commutativity of the terms of \(H\), we may write the exponential of \(H\) as a product of exponentials of individual terms as follows: \[e^{iHt} = e^{i\sum_{i=1}^{m} h_i t} = \prod_{i=1}^{m} e^{i h_i t}.\] So to simulate the time evolution, it suffices to simulate \(e^{i h_i t}\) for each term \(h_i\). To do this, since \(h_i\) acts locally on a constant number of qubits, we can explicitly compute \(e^{ih_i t}\), up to some appropriate finite precision, and then apply the Solovay-Kitaev theorem, in the algorithmic form of [51], to simulate it a sequence of using elementary gates.
We now estimate the time complexity of this procedure. In order to implement \(e^{iHt}\) up to error \(\delta\), we need to implement each \(e^{i h_i t}\) up to error \(\delta/m\). To do this, if each term \(h_i\) is \(k\)-local, it suffices to compute each entry of the matrix \(e^{i h_i t}\) up to error \(\delta/100mk^2\) (so that the total computed matrix is at most \(\delta/100m\) far in operartor norm from \(e^{ih_i t}\)), and then apply the Solovay-Kitaev theorem to simulate the resulting unitary up to error \(\delta/100m\). Applying the results of [51], we get the claimed gate complexity and runtime. ◻
We will now sketch how to use our rounding to perform Hamiltonian simulation. The main technical obstacle to directly applying a standard algorithm is the following: Hamiltonian simulation algorithms are typically given in the oracle model, where access to \(H\) is given through a unitary oracle \(O_H\) that implements a "block-encoding" of \(H\): \((\bra{0}\otimes I)O_H (\ket{0} \otimes I) \propto H\). However, in our setting, we need to work in a model where the Hamiltonian is given as explicit input (i.e. as a classical string containing descriptions of all the local terms), in order to apply our rounding algorithm. Indeed, implicit in the oracle picture is the assumption that for any realistic Hamiltonian, such an oracle can be implemented efficiently. So we will assume that we have a method to construct such a block encoding and leave its size as a parameter.
Our rounding says that \[H = H' + \Delta,\] where \(H'\) is a commuting Hamiltonian with \(\|H'\| := \alpha_A \leq m\), and \(\Delta\) is a local Hamiltonian with \(\|\Delta\| := \alpha_B \leq 216 m \varepsilon^{1/6}\). Moreover, \(H'\) and \(\Delta\) are efficiently computable from \(H\). To perform Hamiltonian simulation, suppose that once we have written down \(\Delta\), we can find a block encoding of \(\Delta/\alpha_B\) with gate complexity \(T_{block}\). Then we can apply the interaction picture algorithm of Low Wiebe. To calculate the gate complexity of the resulting circuit, we apply Theorem 7 from [43] with \(H'\) as the "fast" part of the Hamiltonian and \(\Delta\) as the slow part. This theorem tells us that the gate complexity is \[O(\alpha_B t(C_B + C_A)\polylog(t(\alpha_A + \alpha_B)/\delta)),\] where the quantities \(C_A, C_B\) are as follows:
\(C_B\) is the gate complexity of a block encoding of \(\Delta/\alpha_B\). By our assumption, this is \(T_{block}\).
\(C_A\) is the gate complexity of a simulation of \(e^{-iH'/\alpha_B}\) up to error \(\delta\). By 8, we have that \(C_A = O(m \poly(\log(m/\delta), \log \alpha_B^{-1}))\). (In fact, it is also a requirement of the theorem that the gate complexity of a simulation of \(e^{-iH't}\) to error \(\eta\) should scale as \(O(t \log^{\gamma}(t/\eta))\) for some constant \(\gamma\), and this is also true for us by 8.)
Putting this together and ignoring polylogarithmic factors we get a gate complexity of \[\tilde{O}(m(T_{block} + m) \varepsilon^{1/6} t).\] The important feature of this expression is that it scales in the norm of \(\Delta\) and the commutator error, rather than in the total norm of the Hamiltonian.
islam@bu.edu↩︎
anandn@mit.edu↩︎
poremba@bu.edu↩︎
The commutator of two operators \(A\) and \(B\) is defined as \([A,B] = AB - BA\).↩︎
For example, suppose that \(A\) and \(C\) act differently inside the same degenerate subspace of the matrix \(B\). Then, both matrices can commute with \(B\) but they need not commute with each other.↩︎
For a comparison with the results of [24], which considers non-constructive rounding, see Section 1.3.↩︎
Here we mean the difference in energy thresholds for the YES and NO cases of the local Hamiltonian problem. Note that in the formal satement of 1 we use the relative promise gap \(\gamma\), which is equal to the energy promise gap divided by \(m\).↩︎
We remark that Schmidhuber et al. [39] recently studied another form of "almost commuting" Hamiltonians; namely, signed Pauli Hamiltonians with a sparse anti-commutation graph. In their work, they provide evidence that Gibbs sampling and optimization for such almost commuting systems is classically intractible, hinting at potential quantum advantage of the HDQI algorithm. However, their notion of almost commuting Hamiltonians is different from ours, and hence our rounding algorithm does not apply in their setting.↩︎
We remark that prior no-go results on rounding general Hermitian matrices already apply to triplets [22].↩︎
Here, the subscript indicates the qubit and we omit single-qubit identity operators for ease of notation.↩︎
We technically define a promise version of \(\NP\). Historically, containment in \(\NP\) was defined when any binary string was either yes or no. That promise version of \(\NP\) has been recently widely adopted when talking about promise problems.↩︎
We have heard it credited to Lijie Chen, but it may be folkore.↩︎
Our definition of \(\gamma\)-2-CLH requires \(\gamma \geq 1/\poly(n)\).↩︎
Without that condition, we can only conclude that \(A\) and \(B\) can be simultaneously diagonalized and that \(B\) and \(C\) can be simultaneously diagonalized, but not necessarily all three can be simultaneously diagonalized. If \(B\) is a multiple of the identity, then any two non-commuting matrices will be a counterexample.↩︎
And polynomial in the bit complexity of each Hamiltonian term.↩︎
This convention is without loss of generality, since one can absorb all terms that act on a pair \(i,j\) into a single term at the start of the analysis.↩︎