arXiv:2610.01141quant-phOct 2026

Manuscript Offprint

arXiv:2610.01141

Classical Hardness of Learning Functions of Hamiltonians

Sota Hashimoto, Akinori Kawachi

Abstract

Morohoshi, Nakayama, Manabe, and Mitarai [MNMM25] proposed a physically motivated quantum machine learning problem in which the goal is to predict quantities of the form Tr[f(H)ρ]\text{Tr}[f(H)\rho] from classical descriptions of a Hamiltonian HH and a quantum state ρ\rho, where ff is an unknown function. We call this problem Hamiltonian function learning in this paper. They constructed an efficient quantum learning algorithm under suitable conditions, while leaving a rigorous proof of average-case classical hardness open. In this paper, we rigorously prove the average-case classical hardness for two distribution-specific Hamiltonian function learning problems for fcos⁡,π(λ)=cos⁡(πλ)f_{\cos,\pi}(\lambda) = \cos(\pi\lambda) and fexp⁡,β(λ)=e−βλf_{\exp,\beta}(\lambda) = e^{-\beta\lambda} discussed in [MNMM25] under the assumption of the average-case hardness of factoring random RSA moduli. More specifically, we show that an efficient classical randomized learner under squared loss whose output hypotheses are evaluable in classical polynomial time for either problem would yield a classical randomized polynomial-time algorithm for factoring random RSA moduli.

1 Introduction

Quantum machine learning (QML) studies learning tasks involving quantum computation or quantum systems [BWP +^{+}17, HCT +^{+}19, SK19, CHC +^{+}22]. A central theoretical goal is to determine when quantum computation can provide a provable advantage over classical randomized polynomial-time algorithms. Whether such a separation exists depends on the precise learning model, including the input and data-access models, the performance measure, and the class of classical algorithms used for comparison.

Cryptographic assumptions have long been used to establish computational hardness in learning. Kearns and Valiant gave representation-independent hardness results for the probably approximately correct (PAC) learning by reducing cryptographic problems, including breaking RSA and factoring Blum integers, to learning problems [KV94], and Servedio and Gortler obtained quantum-classical computational separations for PAC learning under the hardness of factoring Blum integers and for exact learning from membership queries under the existence of one-way functions [SG04]. More recently, Liu, Arunachalam, and Temme [LAT21] established such a separation based on the hardness of the discrete logarithm problem, and Gyurik and Dunjko [GD23] examined how the learning model determines where the classical difficulty arises. These computational separations should be distinguished from sample-complexity advantages, which are known to be limited: quantum and classical sample complexities coincide up to constant factors in the PAC and agnostic models [AdW18], and, for predicting outcomes of quantum experiments with small average error, classical learners need only a number of experiments comparable to that of quantum learners [HKP21].

Morohoshi, Nakayama, Manabe, and Mitarai [MNMM25] introduced the learning problem studied in this paper, aiming at a QML problem of practical relevance. In contrast to cryptographically constructed learning problems, their problem is motivated by a physical setting in which the Hamiltonian of a quantum system is known, but the relation between the Hamiltonian and experimental outputs is not. They model such an output as a quantity of the form Tr[f(H)ρ]\text{Tr}[f(H)\rho], where the unknown function ff represents this relation, and the goal is

*Graduate School of Engineering, Mie University, 426M527@m.mie-u.ac.jp

†^{\dagger}Graduate School of Engineering, Mie University, kawachi@info.mie-u.ac.jp to predict this quantity from a Hamiltonian H and a quantum state ρ\rho, given labeled examples. We call this problem Hamiltonian function learning in this paper. They constructed an efficient quantum learning algorithm under suitable conditions on the unknown function ff, the input Hamiltonian HH, and the input quantum state ρ\rho. Furthermore, they verified the feasibility of their proposed algorithm by implementing it for f(λ)=e−βλf(\lambda) = e^{-\beta\lambda} on a superconducting device using up to 40 qubits.

They also discussed the classical hardness of their learning task as evidence for a quantum advantage in QML. For f(λ)=cos⁡(tλ)f(\lambda) = \cos(t\lambda), they connected Tr[cos⁡(tH)ρ]=ReTr[e−itHρ]\text{Tr}[\cos(tH)\rho] = \text{Re}\text{Tr}[e^{-itH}\rho] to Hamiltonian simulation and argued that predicting this quantity should be classically hard for t=poly(n)t = \text{poly}(n).

However, they left a rigorous proof of average-case classical hardness for Hamiltonian function learning open. In this work, we present such a result under the assumption that factoring random RSA moduli is classically hard on average. We construct a distribution-specific fcos⁡,πf_{\cos,\pi}-Hamiltonian function learning problem and, for every fixed rational constant β>0\beta > 0, a distribution-specific fexp⁡,βf_{\exp,\beta}-Hamiltonian function learning problem, both of which are efficiently learnable by their quantum algorithm. Under the above assumption, neither problem is efficiently learnable by a classical randomized algorithm under squared loss when the output hypotheses are required to be classically evaluable. In particular, the hardness holds even though f is fixed in advance and known to the learner. The Hamiltonians in our hard instances are projectors specified succinctly by polynomial-size quantum circuits rather than local Hamiltonians.

Related quantum–classical learning separations have been established in several settings. Pérez-Guijarro, Pagès-Zamora, and Fonollosa studied conditions relating quantum learning speedups to quantum computational speedups and applied their results to learning problems based on factorization [PGPZF24]. Yamasaki, Isogai, and Murao provided a framework for deriving supervised-learning advantages from general quantum computational advantages and constructed corresponding data-preparation protocols [YIM26]. Molteni, Gyurik, and Dunjko proved quantum–classical separations for learning unknown quantum observables in a distribution-free PAC model under the assumption BQP ⊈\not\subseteq P/poly [MGD26]. Barthe, Yaghubi Rad, Grossi, and Dunjko studied supervised learning of unknown Hamiltonian dynamics and proved quantum–classical learning separations under complexity-theoretic assumptions [BYRGD25].

Our result differs from these works in several respects. Pérez-Guijarro et al. require pointwise accuracy on every input in the support, whereas our hardness result holds even for learners that are only required to achieve small expected squared loss. Moreover, their explicit separation examples are based on arithmetic functions of prime factors, whereas we establish hardness for the physically motivated problem introduced by [MNMM25]. Yamasaki et al. give a more general framework for deriving learning advantages from quantum computational advantages, assuming hardness against classical polynomial-time algorithms even with polynomial-length randomized advice, as captured by HeurFBPP/rpoly. In our setting, the reduction requires only average-case hardness against uniform classical randomized polynomial-time algorithms. All training examples in our construction can also be generated in classical polynomial time. Moreover, the reduction is not actually specific to factoring: it extends to problems with a polynomial-length witness uniquely determined by each instance, for which instance-witness pairs are classically samplable, the witness can be recovered in quantum polynomial time and verified in classical polynomial time, and its recovery is hard on average for classical randomized polynomial-time algorithms; see Remark 3.3. Molteni et al. obtain a distribution-free separation under the different assumption BQP ⊈\not\subseteq P/poly, whereas our hardness result holds for expected squared loss under a single explicit, efficiently samplable input distribution. Barthe et al. study the different problem of learning unknown Hamiltonian dynamics, whereas our result concerns the Hamiltonian function learning problem introduced by Morohoshi et al. Consequently, our result gives rigorous average-case classical hardness even when f is fixed in advance; for fcos⁡,πf_{\cos,\pi}, it applies to the fixed choice t=πt = \pi, and for fexp⁡,βf_{\exp,\beta}, it includes the choice of f considered in the experiment on quantum hardware of Morohoshi et al.

Our proof follows the cryptographic reduction strategy of Kearns and Valiant [KV94]. To outline the reduction, let D~n\widetilde{D}_n be the efficiently samplable joint distribution over triples (N,p,q)(N, p, q) generated by a fixed RSA modulus generator [RSA78], where N=pqN = pq, and let Dn\mathcal{D}_n be its marginal distribution on NN. The distinction between the two distributions is essential for the reduction: independent samples from D~n\widetilde{D}_n provide the factors needed to generate training labels, whereas a factoring challenge provides only N∼DnN \sim \mathcal{D}_n. We assume that, given such a random challenge modulus, no classical randomized polynomial-time algorithm can output a nontrivial factorization with non-negligible probability.

Our construction uses a verification circuit based on Shor’s factoring algorithm [Sho97]. Given an RSA modulus NN, a bit position jj, and a bit b∈{0,1}b \in \{0,1\}, we construct a polynomial-size quantum circuit UN,j,bU_{N,j,b} whose acceptance probability is overwhelmingly close to one if bb equals the jj-th bit of min⁡{p,q}\min\{p,q\} and overwhelmingly close to zero otherwise. From this circuit, we define the non-local projector Hamiltonian HN,j,b:=UN,j,b†ΠaccUN,j,bH_{N,j,b} := U_{N,j,b}^\dagger \Pi_{\mathrm{acc}} U_{N,j,b}, where Πacc\Pi_{\mathrm{acc}} is the acceptance projector, and use the all-zero initial state ρ0\rho_0.

Since HN,j,bH_{N,j,b} is a projector, both Tr[cos⁡(πHN,j,b)ρ0]\text{Tr}[\cos(\pi H_{N,j,b})\rho_0] and Tr[e−βHN,j,bρ0]\text{Tr}[e^{-\beta H_{N,j,b}}\rho_0] are affine functions of the acceptance probability of UN,j,bU_{N,j,b}. In particular, the target values for b=0b = 0 and b=1b = 1 are separated by a constant: when bb equals the jj-th bit of min⁡{p,q}\min\{p, q\}, the two target values are close to −1-1 and e−βe^{-\beta}, respectively, whereas both are close to 1 otherwise.

Now suppose that an efficient classical learner exists for either of the two constructed problems. Given a challenge modulus N∼DnN \sim \mathcal{D}_n, a classical factoring algorithm generates an i.i.d. training sample from independently drawn triples (Ni,pi,qi)∼D~n(N_i, p_i, q_i) \sim \widetilde{\mathcal{D}}_n and runs the learner to obtain a hypothesis gg. It then compares g(xN,j,0)g(x_{N,j,0}) and g(xN,j,1)g(x_{N,j,1}) for each bit position jj. Sufficiently small inverse polynomial squared loss ensures that, with probability at least 2/3, these comparisons recover all bits of min⁡{p,q}\min\{p, q\} and hence a factor of NN. Figure 1 summarizes the reduction.

Factoring algorithm B

Figure

Figure 1: Reduction from an efficient learner A to a classical factoring algorithm B.