Introduction

Recent years have witnessed tremendous progress in quantum hardware and quantum algorithms. As near-term quantum devices become increasingly accessible, the need for holistic benchmarking of such devices is also rapidly growing. Indeed, while most of the frequently used quantum benchmarks, such as randomized benchmarking1 and gateset tomography2, still focus on the performance of one or a few qubits, over the past three years a number of ‘whole machine’ benchmarks have been proposed that aim at assessing the performance of quantum devices beyond a small number of qubits3,4,5,6,7,8,9,10.

While results from such generic benchmarks certainly provide important characteristics of the quantum devices themselves, we are ultimately interested in applying the devices to carry out specific computational tasks. However, the circuit structure of quantum algorithms can be vastly different for different algorithms. Generic quantum benchmarks can miss structural information that is specific to a particular algorithm and which may amplify either quantum errors of certain types or errors amongst a certain group of qubits, and/or reduce errors elsewhere. In this work we address the benchmarking of quantum simulations for time-independent Hamiltonians. Such a simulation can be stated as follows: given an initial state \(\left\vert {\psi }_{0}\right\rangle\) and a Hamiltonian \({\mathfrak{H}}\), evaluate the quantum state at time t according to \(\left\vert \psi (t)\right\rangle =\exp (-{{{\rm{i}}}}t{\mathfrak{H}})\left\vert {\psi }_{0}\right\rangle\). Hamiltonian simulation is of immense importance in characterizing quantum dynamics for a diverse range of systems and situations in quantum physics, chemistry and materials science. Simulation of one quantum Hamiltonian by another quantum system was also one of the motivations of Feynman’s 1982 proposal for design of quantum computers11. Hamiltonian simulation is also used as a subroutine in numerous other quantum algorithms, such as quantum phase estimation12 and solving linear systems of equations13.

Following the conceptualization of a universal quantum simulator using a Trotter decomposition of the time evolution operator \({e}^{-it{\mathfrak{H}}}\)14, a number of quantum algorithms for Hamiltonian simulation have been proposed15,16,17,18,19. Detailed assessment of these algorithms, with continued improvement of theoretical error bounds, has since emerged as a very active area of research20,21,22,23,24,25,26,27,28,29,30,31. In this context, one of the most significant developments in recent years is the quantum signal processing (QSP) method17, and its generalization, the quantum singular value transformation (QSVT) method32. For sparse Hamiltonian simulation, the query complexity of QSVT matches the complexity lower bound with respect to all parameters17,32. The QSVT method also enjoys another advantage, namely that the quantum circuit is relatively simple, and requires very few ancilla qubits. QSVT allows one to use essentially the same parameterized quantum circuit to perform a wide range of useful computational tasks, including Hamiltonian simulation33, solution of linear systems32,34,35, and finding eigenstates of quantum Hamiltonians36. In this sense, it provides a ‘grand unification’ of a large class of known quantum algorithms37.

Despite these advantages, QSVT is generally not viewed as a suitable technique for near-term quantum devices today. This is largely because these techniques rely on an input model called ‘block encoding’ which views the Hamiltonian \({\mathfrak{H}}\) as a submatrix of an enlarged unitary matrix \({U}_{{\mathfrak{H}}}\). For Hamiltonians arising from realistic applications (e.g., linear combination of products of Pauli or fermionic operators, and sparse matrices in general), the construction of \({U}_{{\mathfrak{H}}}\) often involves multiple ancilla qubits and multi-qubit control gates. Taken together, these requirements can make QSVT very difficult to implement with high fidelity and to date there has been no QSVT based Hamiltonian simulation on realistic devices.

Results

Overview

In this work we remedy this situation by identifying and demonstrating an application for QSVT on near term quantum devices that allows benchmarking of Hamiltonian simulation for a class of Hamiltonians that are relevant to recent efforts to demonstrate supremacy of quantum computation over classical computation6. This is the class of random Hamiltonians generated from block encoding of random unitary operators that correspond to random unitary circuits. We show that for this class of Hamiltonians it is possible to formulate a simple metric, called the quantum unitary evolution score (QUES), for the success of quantum unitary evolution. This metric is the primary output from the Hamiltonian simulation benchmark, and is directly related to the circuit fidelity. This allows verification of Hamiltonian simulation on near-term quantum devices without any need for classical computation, and the approach can be scaled to a large number of qubits.

The main result of this paper is a very simple quantum circuit (Fig. 1), called the minimal QSVT (mQSVT) circuit. With proper parameterization, the mQSVT circuit is able to propagate a certain class of random Hamiltonians \({\mathfrak{H}}\) to any given target accuracy. In fact, we argue that the mQSVT circuit is not only the simplest quantum circuit for carrying out a QSVT based Hamiltonian simulation, but that it is actually the simplest possible circuit for all tasks based on QSVT. Here \({\mathfrak{H}}\) is not a Hamiltonian corresponding to a given physical system, but a random Hamiltonian generated using a simple random unitary circuit, called a Hermitian random circuit block encoded matrix (H-RACBEM)9. However, for the purpose of benchmarking the capability of a quantum device to perform arbitrary Hamiltonian simulations, averaging over a distribution of the underlying arbitrary Hamiltonians is precisely what is required to generate a holistic benchmark protocol that samples from all possible instantiations.

Fig. 1: Illustration of the minimal quantum singular value transformation (mQSVT) circuit for the Hamiltonian simulation benchmark.
figure 1

The overall circuit implements a complex matrix polynomial \({f}_{t}({\mathfrak{H}})\) of degree d on the Hamiltonian \({\mathfrak{H}}\) that is defined in terms of a pseudo random quantum circuit UA. The circuit acts on n + 1 qubits, consisting of n system qubits and 1 ancilla qubit. After measuring the top ancilla qubit and post-selecting on the 0 outcome of this, the action on the bottom n system qubits accurately approximates \(\exp (-{{{\rm{i}}}}t{\mathfrak{H}})\left\vert {0}^{n}\right\rangle\).

The quantum circuit in Fig. 1 consists of two components: an arbitrary random unitary matrix UA that implicitly defines the Hamiltonian \({\mathfrak{H}}\), together with its Hermitian conjugate \({U}_{A}^{{\dagger} }\) and a series of Rz gates with carefully chosen phase factors \({\{{\varphi }_{i}\}}_{i = 0}^{2d}\) (see Supplementary Note 3). The mQSVT circuit makes d queries to UA and \({U}_{A}^{{\dagger} }\), two of which are shown explicitly in Fig. 1. For an n-qubit matrix \({\mathfrak{H}}\), the total number of qubits needed is always n + 1, i.e., only 1 ancilla qubit, hereafter referred to as the signal qubit, is required. This is even smaller than the simplest QSVT circuit17, which requires at least 2 ancilla qubits. However, more important than the reduction of the number of qubits is the fact that Fig. 1 removes all two-qubit and multi-qubit gates outside of the unitary UA. This means that one can choose any convenient entangling two-qubit gate (e.g. CZ, CNOT, \(\sqrt{{{{\rm{iSWAP}}}}}\)) and any coupling map that is native to a quantum device to construct the random UA. Combining this with the sequence of single qubit Rz gates then makes the resulting benchmarking quantum circuit of Fig. 1 readily executable.

Quantum unitary evolution score (QUES)

Figure 1 implements \({f}_{t}({\mathfrak{H}})\left\vert {0}^{n}\right\rangle\) on the system qubits, where \({f}_{t}({\mathfrak{H}})\) is a matrix polynomial (see Supplementary Note for details), with approximation error in the operator norm upper bounded by \({\|{f}_{t}({\mathfrak{H}})-{e}^{-{{{\rm{i}}}}t{\mathfrak{H}}}\|}_{2}\le \epsilon\). Therefore in the absence of quantum errors, after applying the circuit to the input state \(\left\vert {0}^{n+1}\right\rangle\), the probability \({P}_{t}({U}_{A}):= {\|{f}_{t}({\mathfrak{H}})\left\vert {0}^{n}\right\rangle \|}^{2}\) of measuring the top ancilla qubit with outcome 0 will be close to 1, indicating that the underlying Hamiltonian evolution is unitary.

From now on, we will primarily consider mQSVT circuits with a fixed set of phase factors {φi} and hence fixed simulation time t. For notational simplicity, we will drop the t-dependence in quantities such as Pt(UA), unless specified otherwise.

On a real quantum device, the probability P(UA) should be replaced by \({P}_{\exp }({U}_{A})\), which is the experimentally measured probability. We define the quantum unitary evolution score (QUES) by

$$\,{{\mbox{QUES}}}\,(n,d):= {\mathbb{E}}\left({P}_{\exp }({U}_{A})\right),$$
(1)

where the expectation is taken over the ensemble of random quantum circuit instances UA. The deviation of QUES from 1 then measures the average performance of the quantum computer under a Hamiltonian simulation task.

There is no unique prescription for constructing random quantum circuits. To fix the choice of UA, we employ here the model random quantum circuit construction used to analyze the concept of quantum volume in4. Here, given a number of qubits n, UA is constructed to contain n layers, each consisting of a random permutation of the qubit labels followed by random two-qubit gates between the n qubits. Given this construction, the QUES in Eq. (1) will then depend only on n and d, and the overall depth of the circuit is approximately 2d times the circuit depth of UA. Note that given the basic quantum gate set of a particular quantum device, alternative constructions of UA using random choices of specific one- and two-qubit gates are possible.

Figure 2 shows the results of computing the QUES across 8 different IBM Q quantum devices (https://quantum-computing.ibm.com), each having 5 qubits and one of three distinct coupling maps (panel b). When the number of qubits n ≤ 3, the QUES on all devices is relatively high (0.7) but it decreases sharply for n ≥ 4. In contrast, the QUES decreases only relatively mildly as d increases. This is particularly noticeable for n = 2, which may indicate that the quantum circuit transpiler provided by the IBM Q may be particularly effective for this device with very small qubit number. We emphasize that compared to generic benchmark measures such as the quantum volume, the QUES is specific to the computational task of the Hamiltonian simulation, and any information specific to this is not diluted by additional averaging over output distributions from other computational tasks. In particular, we find that even for quantum devices with relatively small quantum volume (8-QV), the performance in terms of QUES is only mildly worse than for those with a larger quantum volume (32-QV).

Fig. 2: Quantum unitary evolution score (QUES) of the 5-qubit quantum devices provided by the IBM Q platform.
figure 2

(a) Visualization of the quantum circuit UA used in computing QUES. When the number of qubits is n, there are n layers of the dashed boxes consists of the random permutation of the qubits labels followed by random two-qubit gates. After calling the transpiler, the circuit UA is decomposed with respect to the basic gate set \({{\Gamma }}=\{\,{{\mbox{Rz}}},\sqrt{{{\mbox{X}}}},{{\mbox{X}}},{{\mbox{CNOT}}}\,\}\) and the coupling map which indicates the available qubit pairs on which CNOT can act. b Layouts of coupling maps. c Color bar of the heatmap. d Each heatmap displays the benchmarking result of a specific quantum device, with the title showing the name of the device, its quantum volume, and its coupling map. Each QUES is estimated from 50 circuit instances. Each circuit instance is measured with 1000 measurement shots. The number displayed in each heatmap is the QUES value and its 95% confidence interval.

Circuit fidelity and system linear cross-entropy score (sXES)

The quality of a noisy implementation of a quantum circuit is often characterized by the circuit fidelity. Loosely speaking, the output quantum state of a noisy circuit can be characterized as a convex combination of the correct result and the result obtained under noise, i.e., ‘output’ = α × ‘correct result’ + (1 − α) × ‘noise’, where 0 ≤ α ≤1 is the circuit fidelity. Let p(UA, x) be the noiseless bitstring probability of measuring the mQSVT circuit with outcome 0 in the ancilla qubit and an n-bit binary string x in the n system qubits. Let \({p}_{\exp }({U}_{A},x)\) be the corresponding experimental bitstring probability, which can be estimated from the frequency of occurrence of the bitstring 0x in the measurement outcomes. Since the random circuit UA is approximately drawn from the Haar measure, we make analogous assumptions to those in3,6, and assume the following global depolarized error model:

$${p}_{\exp }({U}_{A},x)=\alpha p({U}_{A},x)+\frac{1-\alpha }{{2}^{n+1}}.$$
(2)

We discuss the justification and potential generalization of such an error model in Supplementary Note 4.

Under the global depolarized error model, we now analyze the effect of noise on the circuit and show how measuring the QUES allows the circuit fidelity to be extracted. Prior work has made use of a combination of quantum and classical computation to obtain the circuit fidelity α. Such analysis relies on the possibility of evaluating the noiseless bitstring probability p(UA, x) classically, given UA and x, e.g., via tensor network contraction38. This enabled the estimation of α from measurements of cross-entropy, referred to as XEB in this setting3,6. We adapt this approach to the Hamiltonian simulation problem by defining a system linear cross-entropy score (sXES):

$$\,{{\mbox{sXES}}}\,({U}_{A}):= \mathop{\sum}\limits_{x\ne {0}^{n}}p({U}_{A},x){p}_{\exp }({U}_{A},x).$$
(3)

The prefix ‘system’ is added because the ancilla qubit is fixed to be the \(\left\vert 0\right\rangle\) state in the definition of \(p({U}_{A},x),{p}_{\exp }({U}_{A},x)\), and the \(\left\vert x\right\rangle\) state belongs to the system register. In order to connect to the problem of generating heavy weight samples later, our definition of sXES excludes the bitstring 0n. This is necessary also since the statistical properties of the bitstring 0n are different from those of the bitstrings in the system register. Taking the expectation with respect to the distribution of UA, and rearranging Eq. (2) then gives an expression for the circuit fidelity:

$$\alpha =\frac{{\mathbb{E}}\left(\,{{\mbox{sXES}}}\,({U}_{A})\right)-\frac{1}{{2}^{n+1}}{\mathbb{E}}\left({\sum }_{x\ne {0}^{n}}p({U}_{A},x)\right)}{{\mathbb{E}}\left({\sum }_{x\ne {0}^{n}}p{({U}_{A},x)}^{2}\right)-\frac{1}{{2}^{n+1}}{\mathbb{E}}\left({\sum }_{x\ne {0}^{n}}p({U}_{A},x)\right)}.$$
(4)

This expression holds for any ensemble of random matrices, and relies only on the assumption that the noise model is depolarizing.

Once the probability distribution of UA is specified (e.g., the Haar measure39), the only term in α that requires a quantum computation is sXES(UA), and all other terms in Eq. (4) can be evaluated classically. However, evaluation of the right-hand side of Eq. (4) often requires a significant amount of classical computation when n becomes large3.

Inferring circuit fidelity from QUES

Based on the discussion so far, it might seem surprising that an alternative, very good approximation to the circuit fidelity can readily be obtained from the QUES metric in Eq. (1). This is arrived at by first defining \({P}_{\exp }({U}_{A})={\sum }_{x}{p}_{\exp }({U}_{A},x)\), i.e., the average over all possible output bit strings x of the probability of measuring a given bit string as outcome of the action of UA on the input state \(\left\vert {0}^{n+1}\right\rangle\). Then summing both sides of Eq. (2) with respect to all bit strings x, further taking the expectation value of both sides over all possible UA yields a fidelity estimate αQUES that can be obtained directly from the measured QUES value, namely

$${\alpha }_{{{{\rm{QUES}}}}}=2\times \,{{\mbox{QUES}}}\,-1.$$
(5)

The approximation error ϵ is defined as the maximal error for simulating a bounded Hamiltonian using the mQSVT circuit, namely \(\epsilon := \mathop{\max }\nolimits_{{\|{\mathfrak{H}}\|}_{2}\le 1}{\|{f}_{t}({\mathfrak{H}})-{e}^{-{{{\rm{i}}}}t{\mathfrak{H}}}\|}_{2}\). It determines the extent of deviation of αQUES from α. Specifically, under the globally depolarized noise model, we have the following bound (Supplementary Note 6)

$$| {\alpha }_{{{{\rm{QUES}}}}}-\alpha | \le 16\epsilon +{{{\mathcal{O}}}}({\epsilon }^{2}).$$
(6)

Here the error bound is derived without including the Monte Carlo measurement error due to the finite number of measurement shots. The analysis of the resulting statistical error is given in Supplementary Note 12 C.

It is evident that, unlike Eq. (4), there is no classical overhead for evaluating αQUES for any n. Since the circuit fidelity α should be non-negative, combining Eq. (5) and Eq. (6) also indicates that under the assumption of the depolarizing noise model, we have \(\,{{\mbox{QUES}}}\,\ge 0.5-8\epsilon +{{{\mathcal{O}}}}({\epsilon }^{2})\).

To numerically verify the relation between QUES and circuit fidelity, we make use of the digital error model of3 in which each quantum gate in the circuit is subject to a depolarizing error channel with a certain error rate. We test the resulting noisy quantum circuit with different two-qubit gate error rates r2 and set the one-qubit gate error rate to r1 = r2/10. We also discard the rotation gate with phase factor φ2d, since this just adds a global phase to the exact Hamiltonian simulation. Then, given UA with a total of g1 one-qubit gates and g2 two-qubit gates, the reference value of the circuit fidelity can be set to \({\alpha }_{{{{\rm{ref}}}}}:= {(1-{r}_{1})}^{2d({g}_{1}+1)}{(1-{r}_{2})}^{2d{g}_{2}}\)3,6. We assume UA is Haar-distributed (numerically verified in Supplementary Note 7) to simplify the computation of classical expectations.

Figure 3 summarizes the estimated circuit fidelity for random quantum circuits with different depth parameter d, variable coupling maps, and a range of error parameters. In all cases, we find that the derived circuit fidelity from QUES (αQUES), the circuit fidelity α obtained from sXES, and the reference value αref are generally consistent with each other. Numerical results also show that αQUES exhibits a trend that slightly overestimates the value of the fidelity α (see Supplementary Table 1 for numerical values of the fidelities). We also see that for a given set of error rates r1, r2, the circuits with highest connectivity show the best performance. This is because random circuits on these architectures converge faster to the Haar measure, which reduces the circuit depth (see Supplementary Note 7).

Fig. 3: Circuit fidelity estimated from the quantum Hamiltonian simulation benchmark.
figure 3

Colored grids represent the circuit fidelity estimated from ~100 circuit repetitions. The benchmarking is performed for circuits with a range of number of system qubits, having also variable types of couplings and a range of error parameters. The depth of the random circuit instances is set to the convergent depth deduced from the convergence to Haar measure (see Supplementary Note 7). The right column contains graphical depictions of the coupling maps, the layout of each grid, and the color bar.

In the next two subsections we show how to assess and evaluate whether the Hamiltonian simulation with the mQSVT circuit can be a classically hard task. We first define the analog of XHOG for Hamiltonian simulation, which we refer to as sXHOG, and give conditions for the hardness of this. We then show that potential classical hardness can be inferred directly from the value of the circuit fidelity obtained from the QUES, i.e. from αQUES.

Classical hardness and system linear cross-entropy heavy output generation (sXHOG)

The complexity-theoretic foundation of the Google claim of ‘quantum supremacy’ in6 is based on a computational task called linear cross-entropy heavy output generation (XHOG) with Haar-distributed unitaries3,6,40,41. Specifically, given a number b > 1 and a random n-qubit unitary U, the task is to generate k nonzero bitstrings x1, x2,  , xk {0, 1}n such that \(\frac{1}{k}\mathop{\sum }\nolimits_{j = 1}^{k}q(U,{x}_{j})\ge b\times {2}^{-n}\), where \(q(U,x)=\vert \left\langle x\right\vert U\left\vert {0}^{n}\right\rangle {\vert}^{2}\). Here we use U without the subscript to distinguish the XHOG problem and the sXHOG problem which will be defined later. For k randomly generated bitstrings, we expect that \(\frac{1}{k}\mathop{\sum }\nolimits_{j = 1}^{k}q(U,{x}_{j})\approx {2}^{-n}\). Therefore any value b > 1 will correspond to a ‘heavy weight’ output. When k is large enough, successful solution of the XHOG problem is considered to be classically hard for every value b > 140,41. This holds for every circuit fidelity estimate α > 0 obtained from the XEB metric, leading to the claim of supremacy in6 based on extraction of a value α ≈ 0.002 from the experiments.

For the Hamiltonian simulation benchmark, we can define an analogous linear cross-entropy heavy output generation problem for the n system qubits. Note that the heavy weight samples are now defined only for the system qubits. We shall refer to this heavy output generation problem for Hamiltonian simulation as the sXHOG problem, to emphasize this important feature and the difference from the standard XHOG problem. Specifically, given a number b > 1, a Hamiltonian simulation benchmark circuit with sufficiently small approximation error ϵ, and a random (n + 1)-qubit unitary UA defining a random Hamiltonian on the n qubits, the task is to generate k nonzero bitstrings x1, x2,  , xk {0, 1}n\{0n} such that \(\frac{1}{k}\mathop{\sum }\nolimits_{j = 1}^{k}p({U}_{A},{x}_{j})\ge b\times {2}^{-n}\). Now for the case of Hamiltonian simulation, \(p({U}_{A},x)={{{\mathcal{O}}}}({2}^{-n})\) for any x ≠ 0n at all t, but p(UA, 0n) can be much larger (for more details see Supplementary Figure 5(b) in Supplementary Note 11). The state 0n is then by definition ‘heavy’ and we must therefore exclude this from the measure in order to avoid a trivial outcome. This is what distinguishes the sXHOG problem from the original XHOG problem.

The potential classical hardness of the XHOG problem is justified by a reduction to a complexity-theoretic conjecture, called linear cross-entropy quantum threshold assumption (XQUATH)40. For completeness, we give a similar variant of the reduction of sHOG problem to a conjecture named system linear cross-entropy quantum threshold assumption (sXQUATH) in Theorem 6 of Supplementary Note 9. The concept of sXQUATH directly parallelizes that of XQUATH, with a similar restriction as above to exclude the output bit string 0n (for more details see Supplementary Note 9). Similar to the construction in ref. 40, the classically efficient solution to sXHOG problem yields a violation to sXQUATH, which assumes that p(UA, x) for x ≠ 0n cannot be efficiently estimated on classical computers to sufficient precision.

Inferring classical hardness from QUES

In order to decide whether a noisy implementation of the Hamiltonian simulation benchmark is potentially in the classically hard regime, we need to establish whether or not the sXHOG problem can be solved for b > 1.

Under the assumption that UA is drawn from the Haar measure, and that the approximation error ϵ of the mQSVT circuit is sufficiently small, we derive the following relation between b and the circuit fidelity α:

$$b=1+\frac{\gamma (\alpha -{\alpha }^{* })}{\alpha +1}.$$
(7)

Here α* is a fidelity threshold (not the complex conjugation of α) and γ a constant. Explicit expressions for the threshold value α* and the constant γ are given in Supplementary Note 10. Both quantities are independent of the circuit fidelity α and depend only on the number of system qubits n and the simulation time t. Eq. (7) thus shows that when γ > 0 and α > α*, we will have b > 1 so that the sXHOG problem solved by the mQSVT circuit might be classically hard. This is qualitatively different from the situation for XEB experiments, for which every α > 0 implies b > 16.

Using the relation between QUES and α in Eqs. (5) and (6), and assuming that ϵ is sufficiently small, we immediately arrive at the conclusion that when

$$\,{{\mbox{QUES}}}\,\ge (1+{\alpha }^{* })/2,\quad \gamma \,>\, 0,$$
(8)

the corresponding sXHOG problem might be classically hard for a sufficiently large value of n. This is a surprising result, since as noted above, the estimation of QUES does not require intensive classical computation. In fact it is not even necessary to actually generate any heavy weight samples - instead we just need to measure the value of QUES, Eq. (1), which is readily done by repeatedly running the circuit in Fig. 1 with random circuit parameters as described above. Of course, should one wish to actually solve the sXHOG problem itself, the heavy weight samples would need to be generated using a quantum computer and intensive classical computation for computation of \(\frac{1}{k}\mathop{\sum }\nolimits_{j = 1}^{k}p({U}_{A},{x}_{j})\) would then also be required. But in order to demonstrate the potential regime of classical hardness for Hamiltonian simulation, i.e., the minimal values of n and d to reach this regime, this is not required.

To further investigate the implications of Eq. (7), we now explicitly indicate the time dependence of all quantities (i.e., we employ the notation \(\gamma \to {\gamma }_{t},{\alpha }^{* }\to {\alpha }_{t}^{* }\)). In Fig. 4 we plot the values of \({\gamma }_{t},{\alpha }_{t}^{* }\) according to the expressions given in Supplementary Note 10 as a function of the simulation time t, for n = 4, 8, 12 qubits. Figure 4 shows that γt > 0 for all t, so then we only need to determine whether it is possible to have fidelity \(\alpha \ge {\alpha }_{t}^{* }\). It is evident from Fig. 4 that both \({\alpha }_{t}^{* }\) (panel (a)) and γt (panel (b)) show oscillatory behavior. We now analyze this behavior to identify an optimal time at which the potential classical hardness of Hamiltonian simulation in this random Hamiltonian setting can be demonstrated for a sufficiently large number of qubits n.

Fig. 4: Quantities relevant to the system linear cross-entropy heavy output generation (sXHOG) problem, evaluated using the explicit expressions given in Supplementary Note 10.
figure 4

a The threshold fidelity \({\alpha }_{t}^{* }\) as a function of Hamiltonian simulation time t. The upper value noted on the plot indicates the time value tthr ≈ 2.26 where α*(tthr) = 1. The lower value noted on the plot indicates the regime at finite time topt ≈ 4.81 with the first minimal value of threshold fidelity. b The parameter γt as a function of Hamiltonian simulation time t. The value noted on the plot indicates the value γt ≈ 2 at the optimal time topt ≈ 4.81. The averages in (a) and (b) are estimated numerically from ~100 instances of the mQSVT circuit encoding random Hamiltonians drawn from the Haar measure. Insets in each panel show the behavior of \({\alpha }_{t}^{* }\) and γt near the optimal time topt ≈ 4.81.

For very short times, i.e., when t ≈ 0, we have \({\alpha }_{t}^{* } \,>\, 1\). This means that we cannot have b > 1 for any value of the circuit fidelity 0 ≤ α ≤ 1. To see why this is the case, consider the limit t = 0. Here pt(UA, 0n) = 1, and pt(UA, x) = 0 for any x ≠ 0n. By continuity, when t is very small, the magnitude of pt(UA, x) for most bitstrings x ≠ 0n is still very small and cannot reach the heavy output regime. Figure 4(a) also shows that there is a critical simulation time tthr ≈ 2.26, for which \({\alpha }_{t}^{* } \,<\, 1\) for any t > tthr.

When t > tthr, ideally we would like to have \({\alpha }_{t}^{* }\approx 0\), so that a very low experimental circuit fidelity α is sufficient to reach the heavy output regime. To this end we investigate what happens at the vanishing circuit fidelity, i.e., α = 0. Detailed analysis shows that in the large n limit, we have \({\gamma }_{t}{\alpha }_{t}^{* }={\mathbb{E}}\left({p}_{t}({U}_{A},{0}^{n})\right)\), and Eq. (7) can be simplified as (see Supplementary Note 10)

$$b{| }_{\alpha = 0}=1-{\mathbb{E}}\left({p}_{t}({U}_{A},{0}^{n})\right),$$
(9)

where the expectation value is taken with respect to the random unitaries UA as before. Thus when the expectation value is positive, i.e., \({\mathbb{E}}\left({p}_{t}({U}_{A},{0}^{n})\right) \,>\, 0\), in the large n limit we have bα=0 < 1 and the task should not be classically hard. Moreover, since b is a continuous function of α, even if we now have finite circuit fidelity α, when this is small enough we can still find b < 1. This provides an alternative explanation of Eq. (7), namely, that the circuit fidelity α needs to be larger than the finite positive threshold value \({\alpha }_{t}^{* } \,>\, 0\) for most values of t > tthr.

As a result of these considerations, when n is large enough, it is important to focus on the regimes where the expectation value \({\mathbb{E}}\left({p}_{t}({U}_{A},{0}^{n})\right)\approx 0\), which from Eq. (7) implies that the threshold fidelity \({\alpha }_{t}^{* }\approx 0\). The numerical results shown in Fig. 4 indicate that this can happen in two different scenarios. The first is when the simulation time t →  (see the analytic justification of this statement in Supplementary Note 12 D). Of course this requires a very large circuit depth and is a physically ‘trivial’ limit that is impractical on near-term quantum devices. The second scenario, which is much more relevant in practice, is when \({\alpha }_{t}^{* }\) reaches its first minimum, which defines an optimal time t = topt. In the large n limit, the value of topt can be rationalized as the first node of the Bessel function J0(t/2) (see Supplementary Note 11). Figure 4(a) shows that for topt ≈ 4.81, we already have \({\mathbb{E}}\left({p}_{t}({U}_{A},{0}^{n})\right)\approx 0\) and \({\alpha }_{t}^{* }\approx 0\). Therefore simulating to the time t = topt is highly desirable, since this is a relatively short time at which the Hamiltonian simulation benchmark is nevertheless now guaranteed to solve the sXHOG problem even for a very small circuit fidelity. Our numerical results indicate that the values of t* and topt depend only weakly on n, and their values are nearly converged for n as small as 12. Therefore this value of topt can be used in a future quantum simulation in the heavy output regime.

Discussion

We have presented a quantum benchmark for Hamiltonian simulation on quantum computers. The Hamiltonian simulation problem is solved using a minimal quantum singular value transformation (mQSVT) circuit. The primary output of the Hamiltonian simulation benchmark is a single number called QUES, which can be verified without any classical computation, even in the regime that is potentially hard for classical computation. Therefore the Hamiltonian simulation benchmark provides a scalable benchmark of the circuit fidelity under the global depolarized error model, and can be executed and verified on future quantum devices with a large number of qubits.

As the current quantum computing technologies advance, the possibility of implementing some error correction is improving42. Here the highly structured mQSVT circuit provides useful indications of where best to implement error correction under limited resources for this. Recall that the mQSVT circuit consists of a series of repetitions of a random circuit UA and its conjugate \({U}_{A}^{{\dagger} }\), interleaved with single-qubit Z rotation operators characterized by carefully selected phase factors. Thus given a specific random Hamiltonian block encoded in UA, the time dependent evolution operator for this Hamiltonian is defined entirely in terms of the phase angles for the single-qubit Z rotation operators. Since these phases should moreover be precisely determined, this suggests that on near-term quantum devices that may allow for some error correction but have overall limited resources, quantum error correction for these single-qubit rotations should be prioritized.

It is also useful to consider here the applicability of this Hamiltonian simulation approach to general Hamiltonians, i.e., not restricted to random Hamiltonians, on near-term quantum computers. Unfortunately it appears that for current quantum technologies there is potentially a large gap between the feasible simulation of a H-RACBEM given in this work and that of a general Hamiltonian relevant to e.g., molecular or solid-state physics. The main reason is that the block encoding of most Hamiltonians of practical interest will involve significant numbers of ancilla qubits, as well as multi-qubit control gates, all of which are extremely expensive on near-term quantum devices. In contrast to this general situation, the construction of H-RACBEM uses only whatever one-qubit and two-qubit gates are available for a given quantum device and is thus considerably easier. Nevertheless, it is possible that undertaking Hamiltonian simulation with H-RACBEM may also yield interesting physical applications to the various settings in which quantum chaotic dynamics are relevant. One immediate possibility in this direction is to use H-RACBEM to simulate the dynamics of quantum scrambling or quantum chaos in strongly interacting quantum systems. Scrambling dynamics can be studied by simulating out-of-time-order correlators (OTOCs) for effective Hamiltonians that can be defined implicitly in terms of a random circuit for time t (see e.g., ref. 43). We note that one can easily perform a Hamiltonian simulation backward in time, merely by reversing the sign of t, so the mQSVT circuit for an OTOC at any time t of a random Hamiltonian encoded in H-RACBEM can be readily constructed by adding local operators between forward and backward implementations of the mQSVT. Evaluation of the circuit at different times t can be implemented either by reevaluating the phase factors (which may required building a longer circuit depending on the accuracy required). The circuits can also be adapted to Hamiltonian simulation at finite temperatures and hence also to scrambling at finite temperatures. From a theoretical perspective it would also be useful to explore to what extent the structure of the H-RACBEM influences the speed of scrambling44.

Our theoretical analysis of the sensitivity of the Hamiltonian benchmarking scheme in this work was based on a fully depolarized noise model, which is often assumed to be a good model for superconducting qubits6. In general the Pauli stochastic noise model on which is based may be biased or non-uniform across qubits. In addition, thermal noise and coherent errors are important for some qubit architectures. It will be useful to extend the current analysis to more general noise models, and some of these aspects are discussed in Supplementary Note 4.

Finally, we note that while this Hamiltonian simulation benchmark is restricted to the specific class of random Hamiltonians, it might also provide information relevant to more general Hamiltonian simulations. Efforts to analyze the complexity of analog Hamiltonian simulations have often focused on the relation of such simulations to classical sampling tasks45,46,47, and are closely related to the cross-entropy analysis for sampling of random quantum circuits of3,6. As noted recently47, the classical hardness can be shown for certain classes of analog quantum Hamiltonian simulation48,49. Note that the potential classical hardness of the original XHOG problem corresponding to Google’s supremacy experiment is justified by a reduction to a complexity-theoretic conjecture called XQUATH40. However, a recent paper50 that appeared after submission of the current work has provided evidence that can refute XQUATH, at least for some classes of quantum circuits. Therefore it is possible that our sXQUATH assumption can be refuted on the same basis. It could be useful to explore generalizations of other classical sampling tasks to the QSVT setting, as was done here for the cross-entropy heavy output generation, to help guide the search for Hamiltonians whose simulation by QSVT can exhibit quantum advantages. Finally, the current approach of analysis of alternative fidelity measures under Hamiltonian simulation using mQSVT may provide useful for analysis of recent fidelity based experimental studies of analog Hamiltonian simulations that followed the emergent random nature of a projected ensemble of states51.

Methods

Details of numerical simulations

All numerical tests are implemented in python3.7 and Qiskit52. Quantum circuits in Fig. 2 are optimized by the transpiler provided by Qiskit before being executed on a real quantum device. The number of measurements (shots) is fixed to be 1000 for the experiments on real quantum devices in Fig. 2, and it is set to 1,000,000 for those on classical simulators in Fig. 3. The classical generation of Haar random unitaries in Fig. 4 is performed by QR factorization to random complex matrices with i.i.d. Gaussian entries according to the recipe in ref. 53.