Higher-order quantum transformations of Hamiltonian dynamics

We present a quantum algorithm to achieve higher-order transformations of Hamiltonian dynamics. Namely, the algorithm takes as input a finite number of queries to a black-box seed Hamiltonian dynamics to simulate a desired Hamiltonian. Our algorithm efficiently simulates linear transformations of any seed Hamiltonian consisting of a polynomial number of terms in system size, making use of only controlled-Pauli gates and time-correlated randomness. This algorithm is an instance of quantum functional programming, where the desired function is specified as a concatenation of higher-order quantum transformations. By way of example, we demonstrate the simulation of negative time-evolution and time-reversal, and perform a Hamiltonian learning task.

Efficiently simulating the dynamics of complex quantum systems is often stated as one of the main motivations of quantum computing.While such simulation is considered hard on classical computers, a range of efficient quantum algorithms have been developed for simulating Hamiltonian dynamics [1][2][3][4][5][6][7].The core principle behind the standard Hamiltonian simulation algorithms is that the desired Hamiltonian dynamics can be wellapproximated by a series of (arguably) simpler quantum operations.These algorithms rely on having a classical description of the desired Hamiltonian, which can often be used for obtaining a decomposition into a sum of easily implementable terms.This limits the way we can develop large-scale, complex quantum programs for dynamics simulation.Quantum algorithms which do not require detailed descriptions of quantum resources have a higher flexibility in quantum software development.This is related to the fundamental problem of understanding how much quantum algorithms need to rely on the classical description of their inputs in order to achieve quantum advantages in information processing.
In this work, we study Hamiltonian dynamics that can be implemented given a seed Hamiltonian H without using a classical description of H.That is, we study transformations of black-box Hamiltonians.We present a quantum algorithm that simulates the dynamics of f (H), where f is any physically realizable linear function of H, given a description of f and using a black-box Hamiltonian H with a bounded energy range.This algorithm is an instance of a higher-order quantum transformation on the unitary operation realized by the seed Hamiltonian dynamics.The functions that the algorithm can implement include both the negative time-evolution and the time-reversal of an unknown Hamiltonian evolution by considering f (H) = −H and f (H) = H T (transposition of H in terms of the computational basis), respectively.Such general transformations have applications ranging from fundamental physics simulations to potential improvements in state-of-the-art algorithms, such as the Hamiltonian singular value transformation [8].We also show an application of our algorithm for Hamiltonian learning [9], in particular, a task of efficiently estimating a parameter of a multi-parameter Hamiltonian using Hamiltonian dynamics by appropriately choosing f (H).
Our work constitutes the first systematic study of higher-order quantum transformations in the context of Hamiltonian dynamics.Higher-order quantum transformations have attracted significant attention in recent years in the context of quantum circuit transformations, and are also known as superchannels, supermaps, quantum combs and process matrices [10][11][12][13][14][15].Higher-order algorithms for quantum computation can be seen as an analogue of functional programming in classical computing, where the possible inputs to an algorithm are quantum channels (for example, unitaries) specified "operationally" by their input-output description only (i.e. as black boxes).
Previous works on this topic have focused on the possible transformations that can be achieved when the input channels are taken to be a finite sequence of quantum gates [10,[15][16][17][18][19][20][21][22][23][24].Yet, the resources available in a given computation are not always best described by a finite sequence of gates, but rather by a continuously parameterized Hamiltonian evolution.In fact, it is known that certain functions such as controllization, which cannot be implemented on black box unitaries [25][26][27][28], can in fact be implemented if access to the underlying Hamiltonian evolution is given [17,29].This is because it is possible to apply an arbitrary fractional power of an unknown Hamiltonian evolution by changing the evolution time, whereas applying a fractional power is not possible for black box unitaries.
Summary of algorithm.-Wenow present our algorithm in detail (see Algorithm 1).We represent Hilbert spaces of an n-qubit quantum system and a single-qubit auxiliary system by H and H c , respectively.We assume that we can invoke the Hamiltonian evolution e −iHτ of a seed Hamiltonian H ∈ L(H) with an upper bound ∆ H of the difference between the maximum and the minimum energy eigenvalues is given, for any time τ > 0.
Algorithm 1 Simulating e −if (H)t Input: • A finite number of queries to a black box Hamiltonian dynamics e −iHτ of a seed Hamiltonian H with τ > 0 on an n-qubit system H • An upper bound ∆H of the difference between the maximum and the minimum energy eigenvalues • Hermitian-preserving linear map f : L(H) → L(H) satisfying f (I) ∝ I, which can always be represented by the Pauli transfer matrix elements γ ⃗ w,⃗ u as for some γ ⃗ w,⃗ u ∈ R and functions f ⃗ w,⃗ u defined by for any tensor products of Pauli operators System: H and one auxiliary qubit Hc Gates: e −iHτ (τ > 0) and controlled-Pauli gates on Hc ⊗ H Procedure: 5  2 βt∆H 2: Initialize: |current⟩ ← |0⟩ ⊗ |ψ⟩ 3: for m = 1, . . ., N do

4:
Randomly choose (all gates other than X s f are independent of f ) and HAD refers to the Hadamard gate We assume that f (I) ∝ I, which ensures that the resulting evolution e −if (H)t preserves the invariance under the global phase of e −iHτ .This class of f covers all phys- 1.A circuit representation of Algorithm 1 implementing the transformation e −iHτ → e −if (H)t for an arbitrary hermitian-preserving linear map f : L(H) → L(H) satisfying f (I) ∝ I.The unitary e −if (H)t is simulated deterministically and approximately, for an arbitrary input state |ψ⟩ ∈ H and the auxiliary qubit initialized in the state |0⟩ ∈ Hc.The number N on the top-right of the bracket refers to the number of iterations while tβ/N is the Hamiltonian evolution time of each iteration.For each iteration, an index w , to perform the j-dependent circuit inside the square brackets.
ically realizable linear transformations of H as shown in Appendix C. In our setting, we are given the Pauli transfer matrices γ [30] as in Eq. (1) of a hermitian-preserving linear map f : L(H) → L(H).Our algorithm simulates the Hamiltonian evolution e −if (H)t for any t > 0 representing the time for the transformed Hamiltonian dynamics up to an error ϵ > 0 and variance 4ϵ (see proof in Appendix A, which relies on more general results proven in Appendix B. A similar analysis of variance is obtained in probabilistic state synthesis [31]).
The runtime of our algorithm is upper-bounded as which is a function of elements of the Pauli transfer matrix.The total evolution time of the input dynamics e −iHτ is βt which can be shown from step 3 and step 6 of the Algorithm 1.
In Algorithm 1, the gate sequence V f,j is constructed only from controlled-Pauli gates, which are Clifford gates.The only element which may be non-Clifford is the black box dynamics e −iHτ .Dependence on the transformation f is specified only through the probability distribution p Step 4 and through the gate H n/ϵ) is calculated by multiplying the number of iterations N with the runtime O(n) for implementing the controlled-Pauli gates in V f,j using CNOT gates and single-qubit Clifford gates.Note that N is independent of n, even though the set of parameters j ∈ ({0, 1, 2, 3} n ) 4 has exponentially many terms.The procedure of Algorithm 1 is summarized in Figure 1.
To understand how the gate sequence V f,j transforms the Hamiltonian at each iteration, Figure 2 shows the explicit evolution of an arbitrary seed Hamiltonian H = ⃗ v c ⃗ v σ ⃗ v after pre-and post-processing with each successive gate in the (random) sequence V f,j averaged over ⃗ v and ⃗ v ′ , namely, 1 simplicity, H is assumed to be traceless (any trace-full part is proportional to the identity and is therefore invariant under the overall transformation f , by construction).
The gate sequence of 1 is constructed in a functional programming approach, namely, by concatenations of a series of higher-order transformations, here called Processes 1 ○ to 7 ○.Each of these processes is designed to implement a Hamiltonian dynamics whose Hamiltonian is given by Applying the first controlled-σ ⃗ v gate before and after the seed Hamiltonian evolution e −iHtβ/N with ⃗ v chosen independently from the uniform distribution in each iteration but perfectly correlated between the pre-and postprocessing within each iteration (Process 1 ○) implements Hamiltonian controllization [17].That is, the effective evolution (ctrlσ ⃗ v )e −i(I⊗H)tβ/N (ctrlσ ⃗ v ) averaged over ⃗ v simulates a Hamiltonian of the form H ⊕ 0.
Algorithm 1 is universal in the sense that it transforms the dynamics of any seed Hamiltonian H to that of the Hamiltonian f (H) for any choice of a physically realizable linear transformation f , even if H is only given as a black box.Therefore the algorithm is an instance of higher-order quantum transformations of Hamiltonian dynamics.The algorithm makes use of a general approximation technique for simulating Hamiltonians of the form g(H) = j h j U j HU † j , where {U j } j is a set of unitaries, {h j } j is a set of positive numbers and H is a seed Hamiltonian.This approximation is represented by the following circuit where λ and p j are defined as λ := h j and p j := h j /λ.The approximation is based on the randomized Hamiltonian simulation of Ref. [3] and the identity U e −iHt U † ≡ e −iU HU † t for any unitary U , time t > 0 and hermitian operator H.This technique is also known as Hamiltonian reshaping [32].Our algorithm can be seen as a special case of the approximation (4) with h j = 2|γ ⃗ u, ⃗ w |/16 n and U j = V f,j , where the seed Hamiltonian has the form I ⊗ H.
Applications of the algorithm.-Wedescribe three applications of our algorithm: the negative time-evolution of Hamiltonian dynamics e −iHτ → e iHt (τ, t > 0), the time-reversal of Hamiltonian dynamics e −iHτ → e −iH T t (τ, t > 0), and a Hamiltonian single-parameter learning task of estimating one of the parameters represented by a Pauli coefficient with Heisenberg-limited precision scaling using its dynamics e −iHτ (τ > 0).
In general, all three applications can be performed even if the dynamics e −iHτ is given as a black box, apart from knowledge of ∆ H .However, given the knowledge that H belongs to a subspace of L(H) spanned by the set {σ ⃗ v } ⃗ v∈J for some J ⊂ {0, 1, 2, 3} n , negative timeevolution and time-reversal can be performed in a runtime of O[poly(|J|)].This property is useful when the Hamiltonian is known to be k-local for some constant k, in which case J = { ⃗ w : || ⃗ w|| 0 ≤ k} satisfies |J| ∼ O(n k ), so that the overall runtime is polynomial in the system size n, based on the fact that ∆ H is also poly(n).
In quantum algorithms that make direct use of Hamil-tonian dynamics, both the positive and negative timeevolution are often assumed to be readily accessible.For example, this is required in the recent Hamiltonian singular value transformation [8].However, in practice, a Hamiltonian evolution being native to a given hardware does not automatically guarantee that the same is true for the corresponding negative time-evolution.Therefore, the ability to efficiently simulate the negative timeevolution of any Hamiltonian given as a black box can decrease the resources required for such algorithms.On the more foundational side, given access to a black box Hamiltonian evolution, one might be interested in simulating the corresponding time-reversed evolution.For example, the evolution of an antiparticle can be described by the time-reversal of the corresponding particle evolution [33,34].The simulations of both negative time-evolution and time-reversal are performed by choosing the function f as f neg (H) := −H and f rev (H) := H T , respectively, which are specified by where s (w1,...,wn In both of these cases, H n/ϵ) is exponential in n in general.However, when H is in a subspace of L(H) spanned by the set {σ ⃗ v } ⃗ v∈J , we can define since f (H) does not depend on values of γ ⃗ w,⃗ u for ⃗ u / ∈ J.In this case, β = 2|J| so the runtime scales as for a realistic Hamiltonian whose number of terms |J| is polynomial in the system size n.For a general Hamiltonian linear transformation f , if both the seed Hamiltonian and the transformed Hamiltonian have a polynomial number of terms in n, then the non-zero elements of f can be truncated so that the runtime O(β 2 t 2 ∆ 2 H n/ϵ) has a polynomial dependence on n.
We note that the runtime scales as t 2 , meaning that in order to perform the time-reversal or negative timeevolution by this algorithm, the dynamics is slowed down quadratically.An application of simulating the negative time-evolution to Hamiltonian block encoding [8] is described in Appendix D.
Finally, we consider an application of our algorithm to Hamiltonian single-parameter learning.Estimation techniques of parameters of unknown Hamiltonians for Hamiltonian learning have many applications in quantum sensing [35], analyzing properties of quantum many-body physics [36], and quantum device calibration [37].Recently, an estimation technique achieving the Heisenberg limit for the precision scaling in the estimation of parameters of a low-interaction Hamiltonian utilizing transformations of Hamiltonian dynamics has been proposed [32].Our algorithm can be used to extend similar techniques to a more general class of n-qubit Hamiltonians.
Our estimation algorithm consists of two steps.The first step simulates e −if ⃗ v (H0)t (t > 0) using the Hamiltonian dynamics e −iHτ (τ > 0) where ⃗ v specifies c ⃗ v that we want to estimate and f ⃗ v is a hermitian-preserving linear map chosen as and changes all other coefficients to be zero, and then sends the coefficient which is chosen for the convenience of the second step.The corresponding γ is given by γ ⃗ w⃗ u := δ ⃗ w,(2,0,...,0) δ ⃗ u,⃗ v .The second step performs robust phase estimation [38] using e −if ⃗ v (H)t similarly to the technique in [32] to obtain an estimate for c ⃗ v , by measuring only the first qubit in our algorithm.The total evolution time is O((log δ)/ϵ) where ϵ is precision and δ is the failure probability, which achieves the Heisenberg-limited precision scaling.The detailed procedure and analysis of the total evolution time are given in Appendix E.
For parameter estimation of low-interaction Hamiltonians, the method of [32] can perform the full-parameter estimation in a single run with total evolution time O((log δ)/ϵ), while our method requires polynomially longer total evolution time as we need to repeat the single parameter estimation for every parameter to perform the same task.However, the method of [32] requires exponential total evolution time for estimating a highinteraction coefficient (a coefficient of a k-local Hamiltonian term with k = O(n)), while our algorithm requires the same total evolution time for any coefficient.Therefore, our algorithm is suitable for estimating a single parameter of non-local Hamiltonians.
Summary and outlook.-Wepresented a universal algorithm that can simulate any linear physically realizable hermitian-preserving transformation of any Hamiltonian dynamics given as a black box.Our algorithm requires only a finite number of calls to the black box Hamiltonian dynamics and random pairs of correlated controlled-Pauli gates.We showed how our algorithm can simulate both the time-reversal and negative time-evolution of any unknown Hamiltonian dynamics, as well as an application to Hamiltonian single-parameter learning, efficiently estimating a single parameter of a multi-parameter Hamiltonian.
In our algorithm, the probability distribution for choosing multiple gates at different time steps are correlated in the sense that the gate V f,j is always used together with its adjoint V † f,j , and the probabilities for picking its component controlled-Pauli gates are correlated via a joint probability distribution.This algorithm demonstrates how multiply correlated randomness can be leveraged to construct unitary operators without introducing decoherence.Our algorithm is a starting point for the emerging field of black box Hamiltonian simulation.One possible future direction is to extend higherorder quantum transformations of Hamiltonian dynamics to Hamiltonian transformations beyond hermitianpreserving linear transformations.
Appendix A: Error and variance analysis on Algorithm 1 In this section, we prove a theorem (Theorem 1) evaluating the error and variance of Algorithm 1 in simulating e −if (H)t .We use the same notation and symbols appearing in Algorithm 1 in this appendix and the following appendices.
For evaluating the error of the simulated quantum operation from the target quantum operation, we use the diamond norm ∥E∥ ⋄ of a quantum operation E : L(H) → L(H) defined as [39] ∥E∥ ⋄ := sup where the identity operation I acts on a Hilbert space isomorphic to H, A is an arbitrary linear operator on H ⊗ H, and ∥A∥ 1 is the trace norm defined by Theorem 1. .

The approximation error of Algorithm 1 is given by
where F is a map defined by F(ρ) := e −if (H)t ρe if (H)t and F approx is the quantum operation averaged over all random instances of operations performed in Algorithm 1.

The variance of Algorithm 1 is given by
where ⃗ j = (j 1 , . . ., j N ) refers to the set of all indices j chosen in N iterations, p ⃗ j is the probability that ⃗ j is chosen, and F ⃗ j is the unitary performed when ⃗ j is chosen.
Without loss of generality, we can limit the proof of Theorem 1 to the case where ∥H 0 ∥ op < 1, where will also be greater than 1, where where {E k } k is the set of eigenvalues of H.By noticing that the procedure of Algorithm 1 for a Hamiltonian H and time t is the same as that for a Hamiltonian H ′ := H/∆ H (whose traceless part has operator norm of at most 1) and time t ′ := t∆ H , we can always assume that the traceless part of the seed Hamiltonian has operator norm at most 1.Before presenting the sketch of the proof, we describe the error and variance of a simulation technique shown in the circuit of Fig. 4, which is a key element in our algorithm.Similar randomization techniques are also used in [3] (QDrift) and [32] (Hamiltonian learning).The simulation error is evaluated based on [3].In addition, the variance is also evaluated for our algorithm.
Lemma 1.The quantum operation represented by the following circuit

×N
where H is a Hamiltonian normalized as ∥H 0 ∥ op ≤ 1, where H 0 := H − (trH/2 n )I is the traceless part of H, λ > 0, t > 0 are constants, U j is a unitary applied with probability p j , and N is the iteration number given by N = ceil[max( 5λ 2 t 2 ϵ , 5 2 λt)] for ϵ > 0, simulates the dynamics e −ig(H)t of a transformed Hamiltonian g(H) defined as with h j = λp j > 0 in an error smaller than or equal to ϵ > 0 and the variance smaller than or equal to 4ϵ.
Here, the error and the variance of the simulation are defined as Error : Variance : respectively, where G is defined by for a density operator ρ, G approx is the averaged quantum operation simulated in the above circuit, ⃗ j = (j 1 , . . ., j N ) refers to the set of all the indices j chosen in N iterations, q ⃗ j is the probability ⃗ j is chosen, G ⃗ j is the unitary operation performed when ⃗ j is chosen, and the identity operation I belongs to a Hilbert space H ′ with an arbitrary finite dimension.
Proof.Both G and G approx stay unchanged when the seed Hamiltonian H is changed to H 0 since the two dynamics e −iHt and e −iH0t for the same time t differ only by a global phase.Therefore, giving a proof for H = H 0 is sufficient.
Error: The set {H j } of hermitian operators for H j := U j H 0 U † j satisfies ∥H j ∥ op = 1, thus the protocol given by e −iH j tλ/N {p j , j} ×N with h j > 0, N := ceil[max( 5λ 2 t 2 ϵ , 5 2 λt)], and λ := j h j simulates ρ → e −it j hj Hj ρe it j hj Hj in an error smaller than ϵ.Here, the error is measured in terms of Eq. ( 12) with g(H) := j h j H j .This is proved using the fact that the error is smaller than or equal to 2λ 2 t 2 N e 2λt/N as shown in [3] and 2λ 2 t 2 N e 2λt/N ≤ 2ϵ 5 e 4/5 ≤ ϵ.Variance: The variance is proven by using the upper bound shown by Theorem 3 of Appendix B given by We refer to linear maps g expressed by Eq. ( 11) as linear maps in Class T.
Definition 1. Class T of linear maps L(H) → L(H) is defined as a set of linear maps g : L(H) → L(H) which can be specified by a set {(h j , U j )} j of positive numbers h j and unitaries U j on H through the equation where H is an hermitian operator H ∈ L(H).
Class T is closed to concatenation, namely, the following lemma holds.
Proof.It can be proved from the equation given by In the following lemma, f, n, γ ⃗ w,⃗ u , β, j, s f , V f,j follow the definitions in the description of Algorithm 1; 1.The Class T transformation g total : L(H c ⊗ H) → L(H c ⊗ H) specified by {(h j , V f,j )} j for h j := βp j is expressed as a sum of concatenations of Class T transformations as ⃗ u • g (2) • g (1) , where g (1) , g (2) , g ⃗ u , g (4) , g ⃗ w , g (6) , g f, ⃗ w,⃗ u are defined as ⃗ u ( H) := for an input operator H ∈ L(H c ⊗ H).
2. The transformation g total transforms an input operator I ⊗ H for a hermitian operator H ∈ L(H) as Note that the quantum operation performed in step 3 to step 7 of Algorithm 1 approximates the unitary e −ig total (I⊗H)t .Indeed, the circuit shown in Lemma 2 for h j defined above and V f,j defined inside Algorithm 1 coincides with the procedures in step 3 to step 7 due to j h j = β and h j /β = p j .The functions g (1) , g (2) , g ⃗ u , g (4) , g (5) ⃗ w , g (6) , g ○ of Fig. 2. Proof. 1. Class T transformations g (1) , g (2) , g ⃗ u , g (4) , g (5) ⃗ w , g (6) , g , thus the right hand side of Eq. ( 15) consists of Class T transformations specified by We describe how the effective Hamiltonians are transformed in each Class T transformation according to Processes 1 ○ to 7 ○.By defining ⃗ u • g (2) • g (1) ), (17) and using f (H) = ⃗ w,⃗ u γ ⃗ w,⃗ u c ⃗ u σ ⃗ w , Eq. ( 16) is rewritten as Therefore it is sufficient to prove for a seed Hamiltonian H = ⃗ u c ⃗ u σ ⃗ u .Using α defined by H = H 0 + αI where H 0 is the traceless part of H (tr(H 0 ) = 0), Eq. ( 19) is proved by calculating the effective Hamiltonian after each process as H 0 0 0 0 ⃗ u H 0 ⃗ w as the final effective Hamiltonian coincides with the righthand side of Eq. ( 19).The transformations in g (1) and g (4) are obtained due to the equality where M ∈ L(H) is an arbitrary linear operator, which is proved using the fact that {σ ⃗ u } ⃗ u gives a basis of L(H), tr(σ ⃗ u )/2 n = δ ⃗ u,(0,...,0) , and Proof of Theorem 1.As we mentioned above, we limit without loss of generality the proof of Theorem 1 to the case where ∥H 0 ∥ op < 1, where H 0 := H − (trH/2 n )I is the traceless part of H.
For F representing the dynamics of transformed Hamiltonian defined by where g total is the linear transformation defined in the first statement of Lemma 3, it can be shown using Lemma 2 and Lemma 3 that Therefore, Algorithm 1 approximates in an error bounded above as which can be shown using the relationship ] where H 0 , H 1 , H 2 are Hilbert spaces [39].Also, which completes the proof.
Variance: Denoting the quantum operation performed in steps 3-7 of Algorithm 1 when ⃗ j is chosen as E (2) ⃗ j , we obtain The second inequality in Eq. ( 20) is shown by the fact that the partial trace is a 1-norm nonincreasing map, which can be proved by where H A , H B are Hilbert spaces, M is an operator in L(H A ⊗ H B ), and U A , U AB are unitaries.The third inequality in Eq. ( 20) follows from Eq. ( 13) because F is a Class T transformation.
instead of the case of the diamond norm as in Eq. ( 21).First, we rewrite the statement of Theorem 2 by introducing a set of deterministic quantum operations G j as The following Lemma for the quantum operation j p j G j implemented by a random protocol applying G j with probability p j provides a sufficient condition for Theorem 2.
Lemma 4. If the error of a random protocol j p j G j simulating an identity operation on any pure state |ψ⟩ ∈ H satisfies then the bound of the variance satisfies The sufficiency of this statement is shown at the end of this appendix.We also define a complex coefficient a j := ⟨ψ| G j (|ψ⟩ ⟨ψ|) |ψ⟩ to decompose the action of G j on any pure state |ψ⟩ as where ρ j is an operator satisfying tr(ρ j ) = 1 that is perpendicular to |ψ⟩, namely, ⟨ψ| ρ j |ψ⟩ = 0.According to the Fuchs-van de Graaf inequalities [40], we have for a density operator ρ ∈ L(H), a pure state |ψ⟩ ∈ H, and a := ⟨ψ| ρ |ψ⟩.Now, we are ready to prove Lemma 4: Proof of Lemma 4: First, we find a lower bound to the left hand side of Eq. (25).Using the decomposition of G j (|ψ⟩ ⟨ψ|) given by Eq. ( 27), Eq. ( 25) can be bounded as where {|ψ ⊥ j ⟩} is a set of states (density operators) perpendicular to |ψ⟩ and the set {|ψ⟩ , |ψ ⊥ 1 ⟩ , |ψ ⊥ 2 ⟩ • • • } forms an orthonormal basis.In the above evaluation, the second inequality holds due to the definition namely, this is based on the fact that for a unitary is equal to the right hand side of the second inequality.
Proof of Theorem 2. The sufficiency of the statement (Eq.( 25) ⇒ Eq. ( 26)) for proving Theorem 2 is based on the equivalence of Eq. ( 24) (the weaker version of Eq. ( 21)) and Eq. ( 25), and the equivalence of Eq. ( 22) and Eq. ( 26).The one-norm ∥ • ∥ 1 is invariant under unitary transformations, namely, for an arbitrary linear operator A and a unitary operator holds.Therefore, the left hand side of Eq. ( 24) and the left hand side of Eq. ( 25) can be shown to be equal as The equality of the left-hand side of Eq. ( 22) and the left-hand side of Eq. ( 26) can be shown in the same way.Thus the equivalence of Eq. ( 24) and Eq. ( 25), and the equivalence of Eq. ( 22) and Eq. ( 26) can be shown.

Appendix C: Universality of Algorithm 1
In this section, we show that our algorithm simulating e −iHτ → e −if (H)t (τ, t > 0) is a universal algorithm to simulate physically realizable linear transformation on a Hamiltonian.Under the assumption that f (H) can also be seen as a Hamiltonian if an input H is a Hamiltonian, we can assume that f is a hermitian-preserving linear map.The universality of our algorithm can be shown in the following lemma.Since our algorithm can simulate an arbitrary f in class (b), it is shown to be able to simulate arbitrary "physically realizable" f . Proof.
The Algorithm 1 can simulate e −iHτ → e −if (H)t (τ, t > 0) for f such that f (I) ∝ I, thus (b)⊆(a).Assuming that e −iHτ → e −if (H)t (τ, t > 0) is physically realizable for an f such that f (I) is not proportional to I, the output unitaries e −if (H1)t = I, e −f (H2)t for H 1 := 0, H 2 := I are physically distinguishable.However, the inputs e −iH1τ = I and e −iH2τ = e −iτ I are only different up to the global phase and thus physically indistinguishable, which leads to a contradiction.Thus (a)⊆(b) is proved.

Appendix D: The application of simulating the negative time-evolution to Hamiltonian block encoding
One application of simulating the negative timeevolution is the block-encoding of an unknown operator given as a block of an unknown Hamiltonian.In this appendix, we present an algorithm for Hamiltonian block encoding utilizing our algorithm and analyze the approximation errors of the algorithm.

Algorithm for Hamiltonian block encoding
Assume we are given access to the Hamiltonian dynamics e −iH(A)τ (τ > 0) of a Hamiltonian H(A) with an upper bound ∆ H(A) of the maximum difference in energy eigenvalues represented as where diagonal blocks can be of arbitrary operators, and the smallest singular value λ min of the operator A on the off-diagonal part is positive.Then, we can construct a quantum operation E approximating the operation of a unitary operator U (A), giving a block-encoding of A defined as If we know that H(A) belongs to a subspace of L(H) spanned by J ⊂ {0, 1, 2, 3} n , then β := 2|J|.This construction is realized by combining the algorithm presented in [8] with our algorithm simulating the negative time-evolution.The algorithm presented in [8] requires the use of e −iH(A)τ for both positive and negative τ , but e −iH(A)τ for only positive τ is used in our algorithm.Therefore our algorithm broadens the applicability of the quantum singular value transformation [41,42] to the case where the classical description of the target operator A is unknown, but is given as the dynamics of a Hamiltonian whose off-diagonal block is guaranteed to be given by A.

Analysis of the runtime
Ref. [8] gives an algorithm which simulates U (A) from dynamics e ±iH ′ (A)τ (τ > 0) where H ′ (A) is defined as where A is a linear operator satisfying A † A ≤ I, in an error smaller than ϵ > 0 using O( log(1/ϵ) λmin ) queries in total to e ±iH ′ (A)τ .Moreover, τ can be fixed to τ = 1.This is achieved by constructing a unitary j (|r j ⟩ |l j ⟩) P (cos λ j ) i sin λ j Q(cos λ j ) i sin λ j Q * (cos λ j ) P * (cos λ j ) ⟨r j | ⟨l j | by performing the quantum singular value transformation using j (|r j ⟩ |l j ⟩) cos λ j i sin λ j i sin λ j cos λ j and its dagger e −iH ′ (A) , where A = j λ j |l j ⟩ ⟨r j | (λ min ≤ λ j ≤ 1) is a singular value decomposition of A, and polynomial functions P , Q are chosen in such a way that sin λ j Q * (cos λ j ) = 1 − cos 2 λ j Q * (cos λ j ) approximates λ j and −iP (cos λ j ) approximates 1 − λ 2 j both with an error smaller than or equal to ϵ for all λ min ≤ λ j ≤ 1 (equivalently, √ 1 − x 2 Q * (x) approximates arccos(x) and −iP (x) approximates 1 − arccos(x) 2 both with an error smaller than or equal to ϵ for all cos 1 ≤ x ≤ cos λ min = 1 − O(λ 2 min )).The measure of the approximation error is based on the error of approximating arccos and is different from the measure used in Eq. ( 33), but it can be easily shown that the error in terms of Eq. ( 33) is bounded by thus the total number of queries to e ±iH ′ (A) for the case where the allowed error in terms of Eq. ( 33) is chosen as ϵ is also O( log(1/ϵ) λmin ) =: d(ϵ).Suppose that we approximate U (A) using this algorithm for the case where the allowed error in terms of Eq. ( 33) is set as ϵ/2 using e −iH ′ (A) and a quantum operation E ′ which approximates the quantum operation of e iH ′ (A) using e −iH ′ (A) instead of preparing e iH ′ (A) .For implementing E ′ , we choose an allowed error in terms of Eq. ( 9) to be ϵ/4d(ϵ/2).In this situation, the overall procedure only requires e −iH ′ (A)τ as input.Because the error measured by Eq. ( 9) times two is larger than the error measured by Eq. ( 33) based on the fact the the diamond norm ∥P ∥ ⋄ of an operation P is greater than or equal to the operator norm ∥P (ρ)∥ op for an arbitrary input density operator ρ, the overall error of simulating U (A) in terms of Eq. ( 33) is upper bounded by where the second term of the left hand side corresponds to the total error arising from the approximation error for E ′ calculated by (error of approximating E ′ ) × (upper bound of the number of queries to E ′ ).Because E ′ can be constructed from e −iτ H ′ (A) by simulating e iH ′ (A) with the negative time-evolution for t = 1 with an allowed error in terms of Eq. ( 9) being chosen as ϵ/4d(ϵ/2) in a runtime O( ) (see the main text), the total runtime of constructing U (A) will be calculated by (runtime of simulating E ′ ) × (upper bound of the number of queries to E ′ ).
We have described the runtime analysis of constructing U (A) using e −iH ′ (A)τ so far.This procedure can be extended to the case where the input dynamics is e −iH(A)τ instead of e −iH ′ (A)τ because e ±iH ′ (A)t can be constructed from e −iH(A)τ and e iH(A)τ , and e iH(A)τ is further constructed from e −iH(A)τ by negative time-evolution based on the equation Since H(A) → −H(A) is simulated by a Class T transformation (see Appendix A), the above equation also provides the description of Class T transformations which transform H(A) to ±H ′ (A).Denoting this transformation as H(A) → j h j U j H(A)U † j , the sum j h j is calculated as (β + 1)/2 which is O(β).This technique is also introduced in [8].Using this technique, quantum operations approximating e ±iH ′ (A) with an allowed error ϵ/4d(ϵ/2) can be constructed from e −iH(A)τ (τ > 0) also in time O( ), thus U (A) can be constructed in runtime O( ) as well.
Appendix E: Runtime and total evolution time analysis of Hamiltonian single-parameter learning In this appendix, we present the runtime and total evolution time analysis of our algorithm for the Hamiltonian single-parameter learning task of efficiently estimating a single parameter from the dynamics of a n-qubit unknown Hamiltonian H = ⃗ u c ⃗ u σ ⃗ u satisfying (|c ⃗ u | ≤ 1) with the Pauli vectors (⃗ v ∈ {0, 1, 2, 3} n ) presented in the main text.
In the Hamiltonian transformation algorithm (Algorithm 1) applied for the Hamiltonian single-parameter learning task, we choose the transformation of the Hamiltonian given by The set of linear operators Probability distribution obtained by Algorithm 1 We consider performing a projective measurement on the basis of {|0⟩ , |1⟩} or {|+⟩ , |−⟩} on the first qubit, namely, the qubit on which the Y operator appears in Eq. ( 36) of the state e −if ⃗ v (H)t (|0⟩ ⊗ |0⟩ ⊗n−1 ).The prob-ability of obtaining the outcome 0 for the projective measurement in the basis of {|0⟩ , |1⟩} is given by and the probability of obtaining the outcome + for the projective measurement in the basis of {|+⟩ , |−⟩} is given by Suppose that we construct a quantum operation F approx that approximates F(ρ) := e −if ⃗ v (H)t ρe if ⃗ v (H)t with an allowed error ϵ/2 in terms of Eq. ( 9).
The runtime for simulating F approx is O(β 2 t 2 ∆ 2 H n/ϵ) for β = 2, while the total evolution time of e −iHτ will only be 2t, as can be seen from the procedure of Algorithm 1.
In this case, the probability of obtaining the outcome 0 in the {|0⟩ , |1⟩} basis measurement and + in the {|+⟩ , |−⟩} basis measurement will be close by ϵ to values in Eq. (37) and Eq.(38), respectively.This can be proved for the + case (and similarly for the 0 case) as In the above equations, {|j⟩} j is an orthonormal basis of the Hilbert space to which I ⊗n−1 belongs.
Learning c ⃗ v using robust quantum phase estimation Theorem I.1.in [38] can be rephrased to the following theorem.Then for any allowed standard deviation s > 0, an estimate θ of θ can be obtained with a standard deviation smaller than or equal to s by a classical computation with runtime O(polyK) of a function of the numbers of success of (0, 2 j−1 )-measurements and (+, 2 j−1 )measurements (j ∈ {1, . . ., K}) both among M j times of the measurements.Here, M j and K are defined as M j := F (δ sup )(3(K − j) + 1) We can perform (0, 2 j−1 )-measurements and (+, 2 j−1 )measurements for j ∈ Z >0 for θ = c ⃗ v using simulation of e −if ⃗ v (H)t for t = 2 j−2 and ϵ = 1/2 √ 8 (or any positive number smaller than 1/ √ 8 can be used instead).The runtime of (0, 2 j−1 )-measurements and (+, 2 j−1 )-measurements in this case is bounded above using a constant C > 0 independent of j by C∆ 2 H 4 j−2 n, and the total evolution time of the dynamics e −iHτ is 2 • 2 j−2 = 2 j−1 .Therefore, the total time of running the quantum circuit is bounded above as while the total evolution time of e −iHτ in the overall experiment is In the above calculation, we use an equation which holds for an arbitrary r > 0.
The runtime O(polyK) of the classical calculation can be ignored in the evaluation of the total runtime of estimating c ⃗ v , since it depends on s as poly log(1/s) and tends to infinity more slowly than O(1/s 2 ).
To calculate total evolution time in terms of the error upper bound ϵ > 0 and the maximum failure probability δ > 0, we can modify the learning procedure to repeating estimation of c ⃗ v with standard deviation smaller than or equal to ϵ/2 for O(log(1/δ)) times and adopting the median of O(log(1/δ)) estimates.In this case, the total evolution time will be O(log(1/δ)/ϵ).The failure probability is shown to be smaller than or equal to δ using the fact that the probability that an estimate ĉ⃗ v of c ⃗ v with standard deviation ϵ/2 satisfies |ĉ ⃗ v − c ⃗ v | > ϵ is strictly smaller than 1/2.
Comparison with the Hamiltonian simulation method in [32] Recently, another Hamiltonian learning technique achieving the Heisenberg limit for precision scaling in parameter estimation of a low-interaction Hamiltonian has been proposed [32].Given an n-qubit Hamiltonian H = ⃗ v∈J c ⃗ v σ ⃗ v for a known set of vectors J satisfying the low-interaction Hamiltonian condition, this technique estimates all values of c ⃗ v in a single run with the total evolution time O((log δ)/ϵ) where ϵ is precision and δ is the failure probability.
Our method can learn any single parameter c ⃗ v of a general Hamiltonian for ⃗ v ∈ {0, 1, 2, 3} n \{ ⃗ 0} with total evolution time O((log δ)/ϵ), which also achieves the Heisenberg-limited precision scaling.Note that the total evolution time has no dependence on ∥H∥ op or more generally on n.In this sense, we give a partial answer to the open problem proposed by [32] regarding the learning of Hamiltonians without any structure.We still note that in terms of the total runtime instead of the evolution time, our algorithm is only efficient when ∆ H is small.
For a low-interaction Hamiltonian, the estimation of all c ⃗ v 's using our algorithm requires to run our algorithm for every parameter.Therefore, the total evolution time is (poly n)×O((log δ)/ϵ), which is longer than that of the algorithm in [32] by a polynomial factor (the number of parameters of the n-qubit low-interaction Hamiltonian).However, for estimation of a single parameter c ⃗ v for ⃗ v representing the high-interaction Hamiltonian, namely, the term consisting of multiplications of k = O(n) nonidentity Pauli operators, the algorithm in [32] requires a total evolution time exponential in k, which leads to an exponential overall runtime, as can be seen from section C.2 of [32] (the algorithm in [32] can be applied to a general n-qubit Hamiltonian and restricted to estimation of only a single parameter).On the other hand, our algorithm requires a constant total evolution time O((log δ)/ϵ), and a runtime independent of k.For these reasons, our algorithm is suited to estimate a single parameter of non-local Hamiltonians.With our method, a parameter of an experimentally simulated Hamiltonian with a not-too-large norm, which does not necessarily have a simple structure, becomes obtainable.
Finally, we note that our algorithm also runs in a shorter runtime than the methods based on unitary tomography for the estimation of a single parameter.Recently, a unitary tomography method for estimating only a small number of entries of a unitary operation in a short time has been proposed [43].However, this is not equivalent to the estimation of a small number of entries of a Hamiltonian.In order to obtain the value of c ⃗ v of a Hamiltonian H by tomography of the unitary evolution e −iHt , the full-tomography of e −iHt is required, which requires a runtime in O(4 n /ϵ) [43].

FIG. 2 .
FIG. 2. A description of how a seed Hamiltonian H = ⃗ v c ⃗ v σ ⃗ v is transformed after each pair of gates in Algorithm 1, for a fixed choice of ⃗ u, ⃗ w.The labels 1 ○ to 7 ○ correspond to the Processes defined in the text.
u correspond to the transformation of the effective Hamiltonian by Processes 1 ○ to 7

Lemma 5 .
The following two classes of linear maps are equal:(a) The class of hermitian-preserving linear maps f : L(H) → L(H) such that the transformation e −iHτ → e −if (H)t (τ, t > 0) is physically realizable with an arbitrarily small error (b) The class of hermitian-preserving linear maps f : L(H) → L(H) such that f (I) ∝ I max aj ,bj ,cj ,dj ∈C |aj |,|bj |,|cj |,|dj |≤1 j ϵa j ϵb j ϵc j ϵd j op ≤ 4ϵ ,