Introduction

The Lie–Trotter–Suzuki product formula1,2,3 was originally used by Lloyd4 to establish the first method for efficiently approximating the dynamics U(t) = e−iHt generated by a local Hamiltonian H with a universal quantum computer. After many refinements5,6 this approach (often called “Trotterization”) continues to be an appealing method for Hamiltonian simulation from both experimental and mathematical perspectives.

The method is based on dividing U(t) into L short-time evolutions U(t) = U(δt)L, t = Lδt, and replacing each U(δt) with an approximation UTro(δt). The parameter L is the number of Trotter steps and δt > 0 is the Trotter step size. Given a decomposition of the Hamiltonian into a sum of layers \(H=\mathop{\sum }\nolimits_{n = 1}^{{{\Gamma }}}{H}_{n}\), the first order product formula approximation is

$${U}_{{{\rm{Tro}}}}(\delta t)\equiv \mathop{\prod }\limits_{n=1}^{{{\Gamma }}}{\rm{e}}^{-{\rm{i}}{H}_{n}\delta t},$$
(1)

where δt and L are chosen to depend on the tolerable level of error, as we subsequently discuss. We term the digital error of this method as Trotter error, usually, it’s quantified by the operator norm distance between the digital evolution operator and the ideal evolution operator.

Most prior works calculate the Trotter error by first relating the global error to the local error (which is the digital error of a single Trotter step), then calculating the local error carefully. However, several reasons motivate us to seek for a different approach. For instance, in the two-layer case H = HA + HB, the first order formula has similar asymptotic error scaling with the second order one7. While it’s hard to prove it from the local error perspective8, for its relation to the global error is non-trivial. Besides, it’s hard to reveal the difference between fidelity error and norm distance error in specific simulations. Although for general situations they share the same asymptotic scaling, in quantum phase estimation (QPE) 9 it’s not the case. Moreover, sometimes the condition about the energy levels of the initial state will influence the error estimation, but it’s unnatural to take it into consideration in this framework.

All these issues can be improved with our framework, which is based on the spectral analysis of the effective Hamiltonian \(\widetilde{H}\) that generates the Trotterized time evolution,

$$\widetilde{H}\equiv {\rm{i}}\log ({U}_{{{\rm{Tro}}}}(\delta t))/\delta t,\quad {U}_{{{\rm{Tro}}}}{(\delta t)}^{L}={\rm{e}}^{-{\rm{i}}\widetilde{H}t}.$$
(2)

Treating δt as a small parameter, perturbative methods can be used to compare the energy levels and eigenstates \(\{{E}_{l},\left|{\psi }_{l}\right\rangle \}\) of the original Hamiltonian H to those \(\{{\widetilde{E}}_{l},\left|{\widetilde{\psi }}_{l}\right\rangle \}\) of the effective Hamiltonian \(\widetilde{H}\). For fixed δt the fidelity between corresponding eigenstates \(\sqrt{1-| \left\langle {\psi }_{l}| {\widetilde{\psi }}_{l}\right\rangle {| }^{2}}\) is independent of the total simulation time, while the error in phase accumulates as \(| {\widetilde{E}}_{l}-{E}_{l}| t\), which is the dominant part of the Trotter error. The detail analysis of the deviation in energy enables us to obtain better upper bounds.

To obtain an improvement for \(| {\widetilde{E}}_{l}-{E}_{l}|\), we consider special cases in which the first order perturbation in energy vanishes. The main two cases are (1) the two-layer Lie-Trotter formula H = HA + HB, and (2) the case in which all the layers of the decomposition simultaneously have real matrix elements in some choice of basis. In the first case, the leading perturbation term has expression −iδt[HA, HB]/2. Given any eigenstate \(\left|{\psi }_{l}\right\rangle\) of H, it’s easy to verify that \(\left\langle {\psi }_{l}\right|[{H}_{A},{H}_{B}]\left|{\psi }_{l}\right\rangle =\left\langle {\psi }_{l}\right|[H,{H}_{B}]\left|{\psi }_{l}\right\rangle =0\). Thus the perturbation in energy has order \({{{\mathcal{O}}}}(\delta {t}^{2})\) instead. As a first conclusion, we reveal the similarity between the first and second order product formulas.

These methods also lead us to consider applications in which the initial state \(\left|\psi \right\rangle\) is (or is close to) an eigenstate of H, enabling an improved upper bound on the Trotter step size in QPE. QPE relates Hamiltonian time-evolution U(t) = e−iHt to the measurement of energy eigenvalues10,11,12. In the ideal version of the algorithm, measuring the output of the phase estimation circuit collapses the system into an energy eigenstate of H. If we replace the time evolution with the product formula approximation UTro(δt)L, then (in the ideal case) we will instead measure an energy eigenvalue of \(\widetilde{H}\). In our framework, the Trotter error in phase estimation can be reduced from \({{{\mathcal{O}}}}(L\delta {t}^{2})\) to \({{{\mathcal{O}}}}(L\delta {t}^{3})\). In terms of the target precision ϵ of the QPE, this means the Trotter step size can be enlarged from \(\delta t={{{\mathcal{O}}}}(\epsilon )\) to \(\delta t={{{\mathcal{O}}}}({\epsilon }^{1/2})\).

Results

Set up and notations

Usually, the Trotter error is quantified by the norm distance between operators.

$${{\Delta }}\equiv \parallel \hat{{{\Delta }}}\parallel ,\quad \hat{{{\Delta }}}\equiv {U}_{{{\rm{Tro}}}}{(\delta t)}^{L}-U(t).$$
(3)

The notation refers to the operator norm: \(\parallel O\parallel =\mathop{\max }\nolimits_{\parallel x{\parallel }_{2}=1}\parallel O\left|x\right\rangle {\parallel }_{2}\), where 2 is the Euclidean norm of vector \(\parallel v{\parallel }_{2}=\sqrt{{v}^{{\dagger} }v}\). To quantify Δ, usually, we relate it to the norm distance error of a single Trotter step δ ≡ UTro(δt) − U(δt) as Δ ≤ Lδ, then calculate δ with Baker–Campbell–Hausdorff formula13 or Magnus expansion14. For a given error tolerance ϵ, the restriction of Δ ≤ ϵ determines the gate complexity of the algorithm.

The Trotterized evolution operator UTro(δt) can also be viewed as an exact evolution under an effective Hamiltonian \(\widetilde{H}\equiv {\rm{i}}\log ({U}_{{{\rm{Tro}}}}(\delta t))/\delta t\). Because the logarithmic of a unitary operator has more than one solutions, we settle down the effective Hamiltonian as \(\widetilde{H}=\widetilde{H}(\delta t)\), where \(\widetilde{H}(\tau )\equiv {\rm{i}}\log ({U}_{{{\rm{Tro}}}}(\tau ))/\tau ,\tau \in [0,\delta t]\) is the branch that is always continuous in τ, and \(\widetilde{H}(0)=H\).

Owing to the tiny size of δt, the energy levels and eigenstates of \(\widetilde{H}\)\(\{{\widetilde{E}}_{l},\left|{\widetilde{\psi }}_{l}\right\rangle \}\) are close to those of H. Denote the projector into the original eigenstate as \({P}_{l}\equiv \left|{\psi }_{l}\right\rangle \left\langle {\psi }_{l}\right|\), and \({\widetilde{P}}_{l}\equiv \left|{\widetilde{\psi }}_{l}\right\rangle \left\langle {\widetilde{\psi }}_{l}\right|\). The fidelity distance between the eigenbasis equals to the operator norm distance between the two projectors,

$$\sqrt{1-| \left\langle {\widetilde{\psi }}_{l}| {\psi }_{l}\right\rangle {| }^{2}}=\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel .$$
(4)

To ensure there exists a one-to-one correspondence between \(\left|{\psi }_{l}\right\rangle\) and \(\left|{\tilde{\psi }}_{l}\right\rangle\), we assume the spectrum is nondegenerate. Therefore there is some spectral gap lower bound \({\widetilde{\lambda }}_{l} \,>\, 0\) around this eigenstate during τ [0, δt]:

$${\widetilde{\lambda }}_{l}\equiv \mathop{\min }\limits_{\tau \in [0,\delta t]}(\mathop{\min }\limits_{m\ne l}| {\widetilde{E}}_{l}(\tau )-{\widetilde{E}}_{m}(\tau )| ),$$
(5)

where \(\{{\widetilde{E}}_{l}(\tau )\}\) is the energy levels of \(\widetilde{H}(\tau )\). In the next section, we will illustrate how the deviations in eigenbasis and energy levels are related to the Trotter error.

Framework

We first point out that Δ does not always reflect the true Trotter error. Separate the digital error into phase error θ and fidelity error f defined by

$$f\equiv 1-| \left\langle \psi \right|{U}^{{\dagger} }(t){U}_{{{\rm{Tro}}}}{(\delta t)}^{L}\left|\psi \right\rangle {| }^{2},$$
(6)
$$\theta \equiv \,{{\mbox{Arg}}}\,\left(\left\langle \psi \right|{U}^{{\dagger} }(t){U}_{{{\rm{Tro}}}}{(\delta t)}^{L}\left|\psi \right\rangle \right),$$
(7)

where \(\left|\psi \right\rangle\) is an initial state, then we prove for any L, δt that satisfy \({{\Delta }}\,\le \,1/\sqrt{2}\), the Euclidean distance error \({{{\mathcal{E}}}}\equiv \parallel \hat{{{\Delta }}}\left|\psi \right\rangle {\parallel }_{2}\) satisfies (see Supplementary Note 1)

$$f+\frac{{\theta }^{2}}{4}\,\le \,{{{{\mathcal{E}}}}}^{2}\,\le \,2f+{\theta }^{2}.$$
(8)

Without further assumptions about H and \(\left|\psi \right\rangle\), the two parameters are bounded by \(f={{{\mathcal{O}}}}({{{\Delta }}}^{2}),| \theta | ={{{\mathcal{O}}}}({{\Delta }})\) as \({{{\mathcal{E}}}}\,\le \,{{\Delta }}\). It means the estimation of Δ is already an upper bound for \(\sqrt{f}\) and θ. However, it’s possible that \(\sqrt{f}\) can have a different parameters scaling with Δ, for the error can be dominated by θ instead.

Given one of the eigenstate \(\left|{\psi }_{l}\right\rangle\) of H as the initial state, we define its fidelity error and phase error as fl and θl. fl is only a function of δt, while θl grows linearly with the simulation time t. To see this, we first project \(\left|{\psi }_{l}\right\rangle\) to the associated effective state \(\left|{\widetilde{\psi }}_{l}\right\rangle\), then let it evolve under UTro(δt)L. Because \(\left|{\widetilde{\psi }}_{l}\right\rangle\) is an eigenstate of this operator, the effect of the evolution is merely a phase. After the evolution, we project the state back to the original eigenbasis. Thus, fl is only relevant to the distance between two eigenstates \(\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel\), and the phase error originates from the difference in energy levels. After a short initial period, the Trotter error only accumulates in the global phase. This is an extreme example of f Δ2.

More general, we can use this perspective to analyze the leakage rate of the Trotterized evolution operator as well. Suppose the initial state is supported on a subspace \({{{\mathcal{L}}}}\), define its leakage rate as the percentage for it to transfer outside \({{{\mathcal{L}}}}\) after evolution UTro(δt)L. Using the argument about \(\widetilde{H}\) we prove: (see Supplementary Note 2)

Lemma 1

Consider a Hamiltonian evolution U(t) = e−iHt simulated by UTro(δt)L, if the initial state ρ belongs to subspace \({{{\mathcal{L}}}}\)

$${P}_{{{{\mathcal{L}}}}}\equiv \mathop{\sum}\limits_{l\in {{{\mathcal{L}}}}}{P}_{l},\quad \,{{\mbox{Tr}}}\,(\rho {P}_{{{{\mathcal{L}}}}})=1,$$
(9)

and the norm distance between \({P}_{{{{\mathcal{L}}}}}\) and corresponding effective projector \({\widetilde{P}}_{{{{\mathcal{L}}}}}\) induced by \(\widetilde{H}\) satisfies \(\parallel {P}_{{{{\mathcal{L}}}}}-{\widetilde{P}}_{{{{\mathcal{L}}}}}\parallel \,< \, 1\), then the leakage rate can be bounded by

$$1-\,{{\mbox{Tr}}}({U}_{{{\rm{Tro}}}}{(\delta t)}^{L}\rho {U}_{{{\rm{Tro}}}\,}^{{\dagger} }{(\delta t)}^{L}{P}_{{{{\mathcal{L}}}}})\,\le \,4\parallel {\widetilde{P}}_{{{{\mathcal{L}}}}}-{P}_{{{{\mathcal{L}}}}}{\parallel }^{2}.$$
(10)

When the subspace \({{{\mathcal{L}}}}\) contains only one eigenstate \(\left|{\psi }_{l}\right\rangle\), the leakage rate is equivalent to fidelity error fl.

Similar analysis can be applied to a general initial state \(\left|\psi \right\rangle\). We first transform \(\left|\psi \right\rangle ={\sum }_{l}{c}_{l}\left|{\psi }_{l}\right\rangle\) into the effective initial state \(\left|\widetilde{\psi }\right\rangle ={\sum }_{l}{c}_{l}\left|{\widetilde{\psi }}_{l}\right\rangle\) (denote the transformation between two eigenbasis as S); then let the state evolve under UTro(δt)L; after the evolution, we can transform the state back to the original basis. The generated state is

$$\left|\widetilde{\psi }(t)\right\rangle ={S}^{{\dagger} }{U}_{{{\rm{Tro}}}}{(\delta t)}^{L}S\left|\psi \right\rangle =\mathop{\sum}\limits_{l}{c}_{l}{\rm{e}}^{-{\rm{i}}{\widetilde{E}}_{l}t}\left|{\psi }_{l}\right\rangle .$$
(11)

Although it’s hard to compare \({U}_{{{\rm{Tro}}}}{(\delta t)}^{L}\left|\psi \right\rangle\) with \(U(t)\left|\psi \right\rangle\) directly, it’s easy to compare \({\sum }_{l}{c}_{l}{\rm{e}}^{-{\rm{i}}{\widetilde{E}}_{l}t}\left|{\psi }_{l}\right\rangle\) with \({\sum }_{l}{c}_{l}{\rm{e}}^{-{\rm{i}}{E}_{l}t}\left|{\psi }_{l}\right\rangle\), and SUTro(δt)LS with UTro(δt)L. Analytically, it means we can separate Trotter error into two parts: the first part originates from the difference in the two eigenbasis, which is only relevant to δt; the other part accumulates during the evolution, which depends on \(| {\widetilde{E}}_{l}-{E}_{l}|\) and grows linearly with the simulation time t. Formally speaking: (see Supplementary Note 3)

Lemma 2

Consider a Hamiltonian evolution U(t) = e−iHt simulated by UTro(δt)L, \(\widetilde{H}\) is the effective Hamiltonian associated with UTro(δt). After spectral decomposition we have H = ∑lElPl and \(\widetilde{H}={\sum }_{l}{\widetilde{E}}_{l}\widetilde{{P}_{l}}\). Given initial state \(\left|\psi \right\rangle\) supported on subspace \({{{\mathcal{L}}}}\) : \({P}_{{{{\mathcal{L}}}}}\left|\psi \right\rangle =\left|\psi \right\rangle\), the Trotter error has upper bound

$$\parallel \hat{{{\Delta }}}{P}_{{{{\mathcal{L}}}}}\parallel \,\le \,\mathop{\max }\limits_{l\in {{{\mathcal{L}}}}}| {\widetilde{E}}_{l}-{E}_{l}| t+2\sqrt{2\,{{\mbox{dim}}}\,({{{\mathcal{L}}}})}\mathop{\max }\limits_{l\in {{{\mathcal{L}}}}}\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel .$$
(12)

A quick remark is, even when t = 0, the upper bound in Eq. 12 is still non-zero. This is because near the beginning time, the digital evolution operator is almost identity, thus SUTro(δt)LS ≈ UTro(δt)L. In this region, the error related to S also increases with t. However, it only happens when the simulation time t is meaninglessly small, thus we don’t emphasize it in Lemma 2.

The remaining part is to derive proper upper bounds for \(| {\widetilde{E}}_{l}-{E}_{l}|\) and \(\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel\), which depends on the specific choice of product formulas. Here we consider the first order formula as an example. Using the Baker–Campbell–Hausdorff formula, \(\widetilde{H}\) can be estimated by

$$\widetilde{H}=H+\frac{{\rm{i}}\delta t}{2}\mathop{\sum}\limits_{n > m}[{H}_{n},{H}_{m}]+{{{\mathcal{O}}}}(\delta {t}^{2}).$$
(13)

The first few terms of the standard (Rayleigh–Schrodinger) perturbation theory can be used to estimate \(\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel\) and \(| {\widetilde{E}}_{l}-{E}_{l}|\), but to avoid convergence issues and derive rigorous results, we use other methods15,16 that are widely used in proofs of adiabatic theorems. By Weyl’s inequality, the perturbation in the eigenvalues satisfies

$$| {\widetilde{E}}_{l}-{E}_{l}| \,\le \,\parallel \widetilde{H}-H\parallel .$$
(14)

The perturbation of the eigenstate is bounded by

$$\begin{array}{ll}\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel =\parallel {\widetilde{P}}_{l}(\delta t)-{\widetilde{P}}_{l}(0)\parallel &\le \,\delta t\mathop{\max }\limits_{s\in [0,\delta t]}\parallel {\widetilde{P}}_{l}^{\prime}(\tau )\parallel \\ &\le \,\mathop{\max }\limits_{\tau \in [0,\delta t]}\parallel {\widetilde{H}}^{\prime}(\tau )\parallel \delta t/{\widetilde{\lambda }}_{l}.\end{array}$$
(15)

The term \(\parallel \widetilde{H}^{\prime} (\tau )\parallel\) quantifies the size of the perturbation. \(\parallel \widetilde{H}^{\prime} (\tau )\parallel \delta t\) shares the same order with \(\parallel \widetilde{H}-H\parallel\). For a general normalized Hamiltonian \(H=\mathop{\sum }\nolimits_{j = 1}^{N}{h}_{j},\parallel {h}_{j}\parallel \,\le \,1\) supported on N site, in Lemma 5 we show that \(\parallel \widetilde{H}^{\prime} (\tau )\parallel ={{{\mathcal{O}}}}(\,{{\mbox{poly}}}\,(N))\). We use it as a proper upper bound in the next paragraphs.

Combinig the estimations of \(\parallel {\widetilde{P}}_{l}-{P}_{l}\parallel\) and \(| {\widetilde{E}}_{l}-{E}_{l}|\) with Lemma 2, we already obtain upper bound for \(\parallel \hat{{{\Delta }}}{P}_{{{{\mathcal{L}}}}}\parallel\). When t is large and \(\,{{\mbox{dim}}}\,({{{\mathcal{L}}}})\) is small, the Trotter error is dominated by \(| {\widetilde{E}}_{l}-{E}_{l}| t\), which is approximately \({{{\mathcal{O}}}}(\parallel \widetilde{H}-H\parallel t)\). This estimation can also be derived from the inequality \(\parallel {\rm{e}}^{-{\rm{i}}\widetilde{H}t}-{\rm{e}}^{-{\rm{i}}Ht}\parallel \,\le \,\parallel \widetilde{H}-H\parallel t\). Thus, till now our approach hasn’t resulted in any significant improvement yet, except for the observation that fl has an upper bound that does not depend on t in the large time region. However, the improvement on the upper bound of \(| {\widetilde{E}}_{l}-{E}_{l}|\) can be used to obtain better results. In the next section, we will show how this improvement is achieved.

Improved \(| {\widetilde{E}}_{l}-{E}_{l}|\) from Special Perturbation

The bound in Eq. 14 is a common estimation. However, in this section, we show that this upper bound can be improved by a factor of δt under assumptions that are satisfied for many Hamiltonians of interest, and this improves the scaling of the operator norm Δ and the Trotter step size needed for QPE.

In perturbation theory, we know that for \(\widetilde{H}=H+V\), the leading perturbation in the lth energy level has expression \({E}_{l}^{(1)}=\left\langle {\psi }_{l}\right|V\left|{\psi }_{l}\right\rangle\). If the perturbation term V is off-diagonal in the eigenbasis of H, then \(\forall l,{E}_{l}^{(1)}=0\), the leading perturbation in energy has order \({{{\mathcal{O}}}}(\parallel V{\parallel }^{2})\) instead. Therefore, consider a general decomposition \(H=\mathop{\sum }\nolimits_{n = 1}^{{{\Gamma }}}{H}_{n}\), whenever the leading order correction (see Eq. 13),

$$V=\frac{{\rm{i}}\delta t}{2}\mathop{\sum}\limits_{n > m}[{H}_{n},{H}_{m}],$$
(16)

is off-diagonal in the eigenbasis of H, we can reduce the Trotter error in energy from \({{{\mathcal{O}}}}(\delta t)\) to \({{{\mathcal{O}}}}(\delta {t}^{2})\). Thus: (see Supplementary Note 5)

Lemma 3

H is a normalized local Hamiltonian on N sites with spectrum \(\{{E}_{l},\left|{\psi }_{l}\right\rangle \}\), \(\widetilde{H}\) is its corresponding effective Hamiltonian induced from first order product formula. The energy and eigenstates of \(\widetilde{H}\) are \(\{{\widetilde{E}}_{l},\left|{\widetilde{\psi }}_{l}\right\rangle \}\). \({\widetilde{\lambda }}_{l}\) is the lower bound of spectral gap defined in Eq. 5. Suppose \(\delta t={{{\mathcal{O}}}}(1/\,{{\mbox{poly}}}\,(N))\) and the first perturbation of \(\widetilde{H}\) is off-diagonal in the eigenbasis of H

$$\forall \left|{\psi }_{l}\right\rangle ,\quad \left\langle {\psi }_{l}\right|\widetilde{H}-H\left|{\psi }_{l}\right\rangle ={{{\mathcal{O}}}}(\delta {t}^{2}),$$
(17)

then the Trotter error in energy satisfies

$$| {\widetilde{E}}_{l}-{E}_{l}| ={{{\mathcal{O}}}}\left(\,{{\mbox{poly}}}\,(N)\delta {t}^{2}\max \left\{1,\frac{1}{{\widetilde{\lambda }}_{l}}\right\}\right).$$
(18)

Here we list several conditions where Eq. 17 is satisfied (or it maintains true for one specific energy level).

  • Any 1D Hamiltonian with nearest-neighbor interactions, as well as general lattice Hamiltonians regarded as 1D chains of super-sites (since our results do not depend on the local dimension). We can always decompose such Hamiltonian into two layers H = HA + HB, where each layer contains only commuting local terms. Then we have V = i[HA, HB]δt/2. [HA, HB] = [H − HB, HB] = [H, HB] is off-diagonal in the eigenbasis of H. For any Hamiltonian with nearest neighbor interaction H = ∑jhj,j+1, we can choose the first layer as the summation of terms supported on (odd, even) site HA = ∑kh2k,2k+1, and set the result part as second layer HB = ∑kh2k−1,2k. See Fig. 1 for a simple illustration.

  • Real Hamiltonians17. Assume all of the local terms of H have real matrix elements in some basis. The components of an eigenstate \(\left|{\psi }_{l}\right\rangle\) of any real symmetric matrices can all be taken to be real. Consider an arbitrary commutator in V, \(\left\langle {\psi }_{l}\right|{H}_{k}{H}_{m}\left|{\psi }_{l}\right\rangle\) is conjugate to \(\left\langle {\psi }_{l}\right|{H}_{m}{H}_{k}\left|{\psi }_{l}\right\rangle\), and both are real numbers. So they are equal and appear with opposite signs in the commutator. Therefore, \(\forall k,l,m,\left\langle {\psi }_{l}\right|[{H}_{k},{H}_{m}]\left|{\psi }_{l}\right\rangle =0\).

  • Frustration-free Hamiltonians18. This type of Hamiltonian satisfies H = ∑jΠj, where Πj is a local term that shares the same ground state with H. (See Theorem 1 in19 for an example) With this property, when the initial state is the ground state, there will be no Trotter error no matter how big δt is. In Lemma 3, the upper bound on the Trotter error is inversely proportional to the spectral gap λ. However, it’s possible for frustration-free Hamiltonian to be gapless19. This example shows that our methods can still overestimate the Trotter error for gapless Hamiltonians.

Finally, we provide an example H = H1 + H2 + H3 in which V is not off-diagonal to show the result in Lemma 3 is not fully general. Let H be a diagonal matrix Λ in the eigenbasis of itself. In this basis, choose

$${H}_{1}=X\otimes I,\quad {H}_{2}=Y\otimes I,\quad {H}_{3}={{\Lambda }}-{H}_{1}-{H}_{2}.$$
(19)

Thus,

$$V/\delta t={\rm{i}}[(X+Y)\otimes I,{{\Lambda }}]/2+Z\otimes I.$$
(20)

The first term is off-diagonal, the second term is not. Thus V is not off-diagonal.

Fig. 1: Implementation of product formula on quantum circuits.
figure 1

A simple illustration of quantum simulation using product formula. Here H = h1 + h2 + h3 + h4. We decompose the local terms into two layers HA = h1 + h3 and HB = h2 + h4. Because the local terms in each layer all commute with each other, there’s no problem in constructing the circuit with local gates.

Comparison between the first and the second order product formulas

Our first conclusion is the similarity between the first and second order product formulas. The second order product formula has expression

$${U}_{\,{{\rm{Tro}}}\,}^{(2)}(\delta t)\equiv \left(\mathop{\prod }\limits_{n=1}^{{{\Gamma }}}{\rm{e}}^{-{\rm{i}}{H}_{n}\delta t/2}\right)\left(\mathop{\prod }\limits_{n={{\Gamma }}}^{1}{\rm{e}}^{-{\rm{i}}{H}_{n}\delta t/2}\right).$$
(21)

In Eq. (121) of5, it has been proved that: \(\parallel {U}_{\,{{\rm{Tro}}}\,}^{(2)}{(\delta t)}^{L}-U(t)\parallel \,\le \,{{{\mathcal{O}}}}(\,{{\mbox{poly}}}\,(N)L\delta {t}^{3})\), which is much better than the first order formula. However, in the two-layer case H = HA + HB, it’s easy to discover their similarity: the corresponding effective Hamiltonians have exactly the same energy levels, and their eigenbasis is related by a small unitary \({\rm{e}}^{-{\rm{i}}{H}_{A}\delta t}\). There has been several works7,8 addressing that the first order product formula can share similar error asymptotic scaling with the second order one. The following corollary can also be regarded as a supportive result:

Theorem 1

Given a normalized local Hamiltonian H on N sites, define \(\widetilde{\lambda }\equiv \mathop{\min }\limits_{l}{\widetilde{\lambda }}_{l}\) with \({\widetilde{\lambda }}_{l}\) introduced in Eq. 5. Suppose the first order product formula UTro(δt)L of H satisfies the condition mentioned in Lemma 3 and \(\delta t={{{\mathcal{O}}}}(1/\,{{\mbox{poly}}}\,(N))\), and the initial state is supported on a low-dimension subspace, then the corresponding operator norm error has upper bound

$$\begin{array}{l}{{\Delta }}={{{\mathcal{O}}}}\left(\,{{\mbox{poly}}}\,(N)L\delta {t}^{3}\max \left\{1,\frac{1}{\widetilde{\lambda }}\right\}\right)\\ \quad\quad\;\;+\,{{{\mathcal{O}}}}\left(\,{{\mbox{poly}}}\,(N)\frac{\delta t}{\widetilde{\lambda }}\right).\end{array}$$
(22)

This theorem is a direct conclusion of Lemma 2 and Lemma 3. Besides the common two-layer case, our result also includes the real Hamiltonian situation, which generalizes previous results.

Application in quantum phase estimation

The QPE algorithm constructs a quantum circuit to detect the phase 2πθ of a unitary operator: \(U\left|\psi \right\rangle ={\rm{e}}^{{\rm{i}}2\pi \theta }\left|\psi \right\rangle\). For an exact QPE algorithm, the measurement outcome is the integer a closest to 2qθ, where q is the size of the first register. Since it’s unlikely for 2qθ to be an integer, the QPE algorithm has precision \(\xi ={{{\mathcal{O}}}}({2}^{-q})\). The probability of measuring the value closest to the true θ is at least 4/π212.

The influence of the Trotter error comes from two aspects. Again let’s regard the Trotterized evolution operator as an exact evolution operator under the effective Hamiltonian \(\widetilde{H}\). This effective Hamiltonian has an eigenstate \(\left|\widetilde{\psi }\right\rangle\), which is very close to the initial eigenstate \(\left|\psi \right\rangle\) : \(\left|\psi \right\rangle =\sqrt{1-p}\left|\widetilde{\psi }\right\rangle +\sqrt{p}|{\widetilde{\psi }}^{\perp }\rangle\). As a result, the final phase detected should be \(\widetilde{\theta }\) associated with \(\left|\widetilde{\psi }\right\rangle\), and the success rate should be decreased by a factor of (1 − p). However, since usually p is much smaller comparing to 1, this change in success rate is almost negligible.

More importantly, the Trotter error in phase \(\delta \theta =| \widetilde{\theta }-\theta |\) should satisfy δθ < 2πξ, otherwise, the phase error caused by Trotterization will be detected. This relation gives us a constraint on the Trotter error

$$| \widetilde{E}-E| t\,\le \,2\pi \xi .$$
(23)

In QPE, θ should be set to be close to 1 to avoid wasting the accuracy provided by the first register, thus \(t={{{\mathcal{O}}}}(1/| E| )\). However, we can only guess about E before the algorithm. Here we use t0 to denote an appropriate choice of time scale in U. Thus,

$$L={{{\mathcal{O}}}}\left(\frac{{t}_{0}}{\delta t}\right),$$
(24)

where L is the circuit depth of a single U in QPE. Follow from Lemma 3, we prove:

Theorem 2

Consider a quantum circuit performing QPE, the size of the first register is q thus the precision is \(\xi ={{{\mathcal{O}}}}({2}^{-q})\). The unitary operator \(U={\rm{e}}^{-{\rm{i}}H{t}_{0}}\) is simulated by \({U}_{{{\rm{Tro}}}}{({t}_{0}/L)}^{L}\). The initial state is the lth eigenstate with spectral gap lower bound \({\widetilde{\lambda }}_{l}\) defined in Eq. 5. Suppose the effective Hamiltonian of the digital evolution operator satisfies the condition in Lemma 3, and \(\delta t={{{\mathcal{O}}}}(1/\,{{\mbox{poly}}}\,(N))\), to guarantee that the Trotter error in phase \(| {\widetilde{E}}_{l}-{E}_{l}| {t}_{0}\) is smaller than 2πξ, we require

$$\delta t={{{\mathcal{O}}}}\left(\frac{1}{\,{{\mbox{poly}}}\,(N)}\sqrt{\frac{\xi }{{t}_{0}}}\min \{1,\sqrt{{\widetilde{\lambda }}_{l}}\}\right),$$
(25)
$$L={{{\mathcal{O}}}}\left(\,{{\mbox{poly}}}\,(N)\sqrt{\frac{{t}_{0}^{3}}{\xi }}\max \left\{1,\frac{1}{\sqrt{{\widetilde{\lambda }}_{l}}}\right\}\right),$$
(26)
$$\,{{\mbox{Circuit Depth}}}\,={{{\mathcal{O}}}}\left(\,{{\mbox{poly}}}\,(N)\sqrt{\frac{{t}_{0}^{3}}{{\xi }^{3}}}\max \left\{1,\frac{1}{\sqrt{{\widetilde{\lambda }}_{l}}}\right\}\right).$$
(27)

As a comparison, in general case with \(| {\widetilde{E}}_{l}-{E}_{l}| ={{{\mathcal{O}}}}(\,{{\mbox{poly}}}\,(N)\delta t)\), the final circuit depth is \({{{\mathcal{O}}}}(\,{{\mbox{poly}}}\,(N){t}_{0}^{2}/{\xi }^{2})\).

The theorem is stated for an initial state that is an exact eigenstate, but by linearity, it can be applied to an arbitrary superposition, with a corresponding reduction in the probability of measuring the energy eigenvalue of interest (in the cases where the desired eigenvalue is measured, it will have the precision guarantee of ϵ despite the use of the enlarged Trotter step size above).

Discussion

Our main contribution is the observation that the refined estimation of Trotter error can be established from the spectral analysis of the effective Hamiltonian \(\widetilde{H}\). When the initial state is an eigenstate, we find that during evolution, most error accumulates in the phase. Further, if the leading perturbation term of \(\widetilde{H}\) vanishes in the eigenbasis of H, the Trotter error in energy is reduced from \({{{\mathcal{O}}}}(\delta t)\) to \({{{\mathcal{O}}}}(\delta {t}^{2})\), which results in improvement of the upper bound of first order product formula, coincides with the previous results7,8. As an application, this improvement significantly reduces the circuit complexity of QPE. Similar results also apply to other phase estimation methods such as robust phase estimation20 (See Supplementary Note 7), as long as the Trotterized unitary operator is used.

One question is the dependence on the gap condition. Our framework requires the spectral gap to be open for \(\widetilde{H}(\tau ),\tau \in [0,\delta t]\). This condition doesn’t show up in previous analysis about product formulas. For instance, for 2-local Hamiltonian with zero spectral gap, it’s direct to simulate its evolution with product formula, while in our method the upper bound of Trotter error diverges. One possible explanation is the inverse dependence on λ can be fake. Consider a Hamiltonian, all of its low energy levels are degenerate, while the perturbation occurs only on the high energy levels. If we still use the formula \(\parallel \widetilde{P}-P\parallel \,\le \,\parallel \widetilde{H}-H\parallel /\lambda\) to analyze a low energy state, we will see the deviation is infinite large, while there’s no perturbation in low energy levels. The effective Hamiltonian associated with Motzkin path model in19 might be an example to reveal this point.

The effective Hamiltonian perspective has also led to a new analysis of the error in digital adiabatic simulation based on Trotterization21. Additional open questions include whether focusing on special cases of observables allows for additional improvement in Trotter error22,23, and whether the effective Hamiltonian perspective may be applicable to the randomized version of product formulas24,25 or other Hamiltonian simulation algorithms26,27,28. Finally, the effective Hamiltonian in our framework is also termed as Floquet Hamiltonian in other fields of study29,30,31, where our methods can be useful as well.

METHODS

Rigorous perturbation methods

Lemma 4

(Rigorous perturbation method16). Consider a parameterized Hamiltonian s [0, s0] → H(s) with spectrum: {Ej(s), Pj(s)}, H(s) and each Pj(s) are continuously differentiable. Define

$$P(s)\equiv \mathop{\sum }\limits_{j=1}^{m}{P}_{j}(s)$$
(28)

as the projector into a subspace \({{{\mathcal{L}}}}\) spanned by m eigenstates. Its derivative has norm upper bound

$$\parallel {P}^{\prime}(s)\parallel \,\le \,\sqrt{m}\parallel {H}^{\prime}(s)\parallel /\lambda ,$$
(29)

where λ is the lower bound of energy gap between the eigenstates in and outside region \({{{\mathcal{L}}}}\).

See Supplementary Note 4.

For a single eigenvector, Lemma 4 implies Eq. 15.

For the special case in which P(s) = P0(s) is the projector onto the ground state, an improved bound on \(\parallel P^{\prime} (s)\parallel\) can be obtained32,

$$\parallel {P}^{\prime}(s)\parallel \,\le \,\sqrt{\frac{\parallel {\widetilde{H}}^{{\prime\prime} }(s)\parallel +2\parallel {\widetilde{H}}^{\prime}(s)\parallel }{2\lambda }}.$$
(30)

The improved dependence on the gap, from λ−1 in Eq. 15 to λ−1/2 in Eq. 30, can be carried through to improve the spectral gap dependence of our results here, when the eigenstate in question is the ground state. In the main text we use the general result \(\parallel {H}^{\prime}(s)\parallel /\lambda\) as a general upper bound for \(\parallel {P}^{\prime}(s)\parallel\).

Similar results can be derived using Sylvester equation as well. See Lemma 3.1 in ref. 33.

Magnus expansion

Use Magnus expansion, we can quantify the perturbation \(\widetilde{H}-H\) caused by Trotter splitting rigorously.

Lemma 5

(Perturbation in effective Hamiltonian34). Given \(\widetilde{H}\) defined in Eq. 2. Define

$$\alpha \equiv \mathop{\sum}\limits_{n > m}| | [{H}_{n},{H}_{m}]| | ,$$
(31)
$$\beta \equiv \mathop{\sum}\limits_{l\ge n > m}| | [{H}_{l},[{H}_{n},{H}_{m}]]| | ,$$
(32)
$$h\equiv \frac{\alpha }{2}+\left(\frac{4}{3}\beta +32\alpha \parallel H\parallel \right)\delta t.$$
(33)

If δt is small in the sense that

$$\mathop{\sum}\limits_{n}\parallel {H}_{n}\parallel \delta t \,<\, 1/4,\quad \beta \delta t \,<\, \alpha ,$$
(34)
$$\alpha \delta t+\beta \delta {t}^{2} \,< \, 2\parallel H\parallel .$$
(35)

then for all τ [0, δt],

$$\parallel \widetilde{H}(\tau )-H\parallel ={{{\mathcal{O}}}}(h\delta t),\quad \parallel {\widetilde{H}}^{\prime}(\tau )\parallel ={{{\mathcal{O}}}}(h).$$
(36)

See Supplementary Note 6.

Although Lemma 5 looks complicated, in most cases h can be well-estimated by the leading term in Eq. 13: h ≈ n>m[Hn, Hm]/2. Furthermore, if \(H=\mathop{\sum }\nolimits_{j = 1}^{N}{h}_{j,j+1}\) is a 2-local normalized Hamiltonian on N qubits that satisfies [hj,j+1, hk,k+1] = 0, j − k > 1 and hj,j+1 ≤ 1, the local terms can always be separated into two layers Hodd = ∑j=2k−1hj,j+1, Heven = ∑j=2khj,j+1. Thus,

$$\parallel [{H}_{{{\rm{even}}}},{H}_{{{\rm{odd}}}}]\parallel =\parallel \mathop{\sum}\limits_{j}[{h}_{j-1,j},{h}_{j,j+1}]\parallel ={{{\mathcal{O}}}}(N),$$
(37)
$$\parallel [{H}_{{{\rm{even}}}},[{H}_{{{\rm{even}}}},{H}_{{{\rm{odd}}}}]]\parallel ={{{\mathcal{O}}}}(N\parallel H\parallel )={{{\mathcal{O}}}}({N}^{2}),$$
(38)

which gives us \(h={{{\mathcal{O}}}}(N)+{{{\mathcal{O}}}}({N}^{2}\delta t)={{{\mathcal{O}}}}(N)\). In general, the parameter dependence of h is complicated but will always be poly(N) for any k-local Hamiltonian. We represent h with poly(N) in the main text, and write the constraint of δt in Lemma 5 as \(\delta t={{{\mathcal{O}}}}(1/\,{{\mbox{poly}}}\,(N))\).