Trotterization for Computational Chemists

Overview

Quantum phase estimation (QPE) determines molecular energies from the phases accumulated during time evolution. Both Quantum Phase Estimation and Bayesian Quantum Phase Estimation therefore rely on implementing the time-evolution operator

\[U(t) = e^{-i\hat Ht},\]

where we use atomic units (\(\hbar=1\)).

The difficulty is that a molecular Hamiltonian contains many terms, whereas a quantum computer implements elementary gates acting on only a few qubits at a time. Trotterization is one way of approximating the full time evolution using a sequence of simpler evolutions.

The key idea is to split a long evolution into short time intervals. Within each interval, we evolve under the individual terms of the Hamiltonian in succession. The resulting sequence is not generally exact, because the terms need not commute. But reducing the time intervals makes the approximation more accurate.

This page explains why that works, what the Trotter order means, and how approximation errors affect energy estimates from QPE or Bayesian QPE (BQPE).

From a molecular Hamiltonian to individual Pauli terms

After mapping an electronic Hamiltonian to qubits, it can be written as

\[\hat H = \sum_{j=1}^{m} c_j P_j,\]

where \(c_j\) is a real coefficient and \(P_j\) is a Pauli string: a product of the operators \(I\), \(X\), \(Y\), and \(Z\) acting on selected qubits.

For example, a simple two-qubit Hamiltonian could be

\[\hat H = 0.7 Z_0 - 0.3 Z_0Z_1 + 0.2 X_0X_1.\]

These are not three separate molecular energies. They are three contributions to a single Hamiltonian, and the required time evolution is the exponential of their sum:

\[U(t) = e^{-it(0.7 Z_0 - 0.3 Z_0Z_1 + 0.2 X_0X_1)}.\]

A quantum circuit can implement the time evolution of an individual Pauli string using basis changes, entangling gates, and a rotation. For example, evolution under \(Z\) on one qubit is

\[\begin{split}e^{-icZt} = \begin{pmatrix}e^{-ict}&0\\0&e^{ict}\end{pmatrix}.\end{split}\]

Implementing each term separately is manageable. But can we simply multiply the individual time evolutions to obtain the full evolution?

Why splitting the exponential is not exact

With ordinary numbers, we know that

\[e^{a+b}=e^{a}e^{b}.\]

For matrices or quantum operators, this identity holds when the operators commute, meaning \(AB=BA\). In general,

\[e^{A+B} \ne e^{A}e^{B}.\]

Consider

\[\hat H = Z + X.\]

Here, \(Z\) and \(X\) act on the same qubit. They do not commute:

\[ZX \ne XZ.\]

Therefore,

\[e^{-it(Z+X)} \ne e^{-itZ}e^{-itX}.\]

Evolving first under \(X\) and then under \(Z\) generally gives a different quantum state from evolving under their sum throughout the entire interval.

For very short times, however, the discrepancy becomes small. This is the observation behind Trotterization.

First-order Trotterization

Suppose the total evolution time is \(t\). Divide it into \(n\) equal Trotter steps, each with duration

\[\Delta t = \frac{t}{n}.\]

For a Hamiltonian \(\hat H=A+B\), first-order Trotterization approximates one short step by

\[e^{-i(A+B)\Delta t} \approx e^{-iA\Delta t}e^{-iB\Delta t}.\]

Repeating the step \(n\) times gives

\[\boxed{U(t) \approx \left(e^{-iA t/n}e^{-iB t/n}\right)^n.}\]

For the Pauli decomposition of a molecular Hamiltonian, the formula is

\[\boxed{S_1(t;n) = \left(\prod_{j=1}^{m}e^{-ic_jP_j t/n}\right)^n.}\]

The product means that every Trotter step applies one evolution for each Pauli term, in a chosen order. After the final step, the total simulated time is \(t\).

With one Trotter step, the approximation may be poor. Using more steps makes the individual approximations more accurate, even though the number of gates also grows.

For fixed total evolution time \(t\), the first-order operator error scales asymptotically as

\[\lVert U(t)-S_1(t;n)\rVert = O\!\left(\frac{t^2}{n}\right).\]

The omitted factor depends on the Hamiltonian, including commutators between its terms. The scaling does not mean that all molecules have the same error for a given \(n\).

Why the ordering matters

In general,

\[e^{-iA\Delta t}e^{-iB\Delta t} \ne e^{-iB\Delta t}e^{-iA\Delta t}.\]

Therefore, the order in which Pauli terms are applied can affect the Trotter error. The order does not change the target Hamiltonian, but it changes its finite-step approximation. Terms that commute can be reordered without changing the result of their product.

In Qrunch, FirstOrderTrotter uses the ordering supplied by its TrotterDecomposer. The number of steps controls how many times that ordered sequence is repeated.

Second-order Suzuki-Trotterization

A simple way to improve the approximation is to make each step symmetric in time. Instead of applying \(A\) followed by \(B\), apply half of the \(A\) evolution, all of the \(B\) evolution, and the other half of the \(A\) evolution:

\[e^{-i(A+B)\Delta t} \approx e^{-iA\Delta t/2} e^{-iB\Delta t} e^{-iA\Delta t/2}.\]

This is the second-order Suzuki-Trotter formula.

The step looks the same when read in reverse order, which is why it is called symmetric. The symmetry cancels the leading error present in the first-order formula.

For a Hamiltonian with \(m\) Pauli terms, define one symmetric step as

\[S_2(\Delta t) =\left(\prod_{j=1}^{m}e^{-ic_jP_j\Delta t/2}\right) \left(\prod_{j=m}^{1}e^{-ic_jP_j\Delta t/2}\right).\]

Then the full evolution is approximated by

\[\boxed{S_2(t;n) = [S_2(t/n)]^n.}\]

For fixed \(t\), the second-order error scales as

\[\lVert U(t)-S_2(t;n)\rVert = O\!\left(\frac{t^3}{n^2}\right).\]

Thus, doubling the number of Trotter steps asymptotically reduces the leading error by about a factor of four, rather than a factor of two for the first-order formula.

Fourth-order Suzuki-Trotterization

We can improve accuracy further by combining several symmetric second-order steps with carefully chosen durations.

The fourth-order formula uses the composition

\[\boxed{S_4(\Delta t) = S_2(p\Delta t)^2 S_2((1-4p)\Delta t) S_2(p\Delta t)^2,}\]

where

\[p=\frac{1}{4-4^{1/3}}\approx 0.41449.\]

This consists of five second-order blocks. Four evolve for a duration \(p\Delta t\), and the middle one evolves for \((1-4p)\Delta t\approx -0.65796\Delta t\).

The negative duration is intentional. It represents inverse time evolution for that block. Together, the five durations add up to \(\Delta t\), while the leading errors cancel.

Repeating the fourth-order step \(n\) times gives

\[S_4(t;n)=[S_4(t/n)]^n,\]

with asymptotic operator error

\[\lVert U(t)-S_4(t;n)\rVert = O\!\left(\frac{t^5}{n^4}\right).\]

A higher-order formula can achieve better accuracy with fewer repetitions, but each repetition contains more Pauli-term rotations. Fourth-order is therefore not automatically cheaper than second-order: which one wins depends on the Hamiltonian, desired accuracy, circuit optimization, and quantum hardware.

Note

The Qrunch SuzukiTrotter strategy implements second- and fourth-order formulas. Its fourth-order construction uses the recursive Suzuki composition shown above. First order is provided by FirstOrderTrotter.

What do the error orders actually mean?

The order is about how rapidly the approximation improves as the individual time intervals become shorter. It is not the number of qubits, the number of Pauli terms, or the number of gates.

For fixed \(t\), the leading asymptotic error scales as follows:

Trotter formulas at a fixed total evolution time

Formula

Operator error scaling

Error if the number of steps is doubled

First order

\(O(t^2/n)\)

About 2 times smaller

Second order

\(O(t^3/n^2)\)

About 4 times smaller

Fourth order

\(O(t^5/n^4)\)

About 16 times smaller

These ratios describe the leading error in the asymptotic regime. For a small number of steps, higher-order terms can matter, and the actual improvement may differ. In particular, this table cannot by itself tell us the best formula for a given molecule.

Why this matters for QPE and BQPE

In Quantum Phase Estimation, the ideal controlled evolution is

\[U(t)=e^{-i\hat Ht}.\]

With Trotterization, the quantum circuit instead implements an approximation \(\widetilde U(t)\).

In ideal QPE, an eigenstate evolves only by accumulating a phase \(-E_kt\). With approximate evolution, additional errors can appear: the accumulated phase can be shifted, and an exact eigenstate of \(\hat H\) need not be an exact eigenstate of \(\widetilde U(t)\).

Therefore using more precision qubits or collecting more BQPE measurements cannot, by itself, eliminate a systematic Trotter error. Those methods improve how precisely we extract phase information from the implemented circuit. They do not make an inaccurate evolution operator exact.

Long evolution times make this particularly important. In textbook QPE, the controlled evolution times typically increase as \(t_0,2t_0,4t_0,\ldots\). A Trotter approximation adequate at \(t_0\) may not be adequate at \(128t_0\).

For example, if a first-order formula is applied with a fixed step size \(\Delta t\), increasing the total evolution time requires more steps. If the number of steps is held fixed instead, each step becomes longer and the approximation can deteriorate.

Trotter accuracy should therefore be assessed at the actual evolution times used by the phase-estimation algorithm, not only at the shortest reference time.

Accuracy versus circuit cost

There are two different ways to spend more quantum computing resources:

  • Increase the number of Trotter steps. Each step becomes shorter, which generally improves the simulated time evolution but increases circuit length.

  • Increase the Trotter order. A more accurate product formula can reach a target accuracy with fewer Trotter steps. However, each of those steps contains more Pauli-term evolutions. The total circuit cost is the number of steps multiplied by the gates in each step, so fewer steps do not necessarily mean fewer gates overall.

The best choice depends on the error budget and on the cost of the individual Pauli-term evolutions. It can also depend on how the terms are ordered and which neighboring gates the circuit compiler can merge.

A useful distinction is between Trotter error and model error. Trotter error concerns how accurately the circuit simulates the chosen Hamiltonian. Model error concerns whether that Hamiltonian faithfully represents the physical system.

The central lesson

Trotterization replaces one difficult time evolution by many simpler ones. It works because over a sufficiently short interval, evolving under the Hamiltonian terms successively approximates evolving under their sum.

First-order Trotterization is simple but less accurate. Symmetric second-order and recursive fourth-order Suzuki formulas cancel more of the approximation error, at the price of more operations per step.

In QPE and BQPE, a more precise phase measurement is only useful if we also simulate the Hamiltonian accurately enough. State preparation, Hamiltonian representation, time-evolution error, and phase-estimation resolution are separate parts of the overall accuracy problem.

See Also