SlowGuess/NeurIPS_2023_OCR huggingface dataset:
The Pauli matrices can act on a single-qubit (2-dimensional) state through matrix multiplication. For the  $N$ -qubit system, we need to specify which qubit the Pauli matrix is acting on by the subscript  $i$  for the  $i$ -th qubit. For example,  $X_{2}$  denotes the  $X$  Pauli matrix acting on the second qubit. To have a complete form of a  $2^{N} \times 2^{N}$ -matrix acting on the  $N$ -qubit system, we need tensor products of Pauli matrices, i.e., Pauli strings. For example,  $I_{1} \otimes Z_{2} \otimes Z_{3} \otimes I_{4}$  is a  $2^{4} \times 2^{4}$ -matrix acting on a 4-qubit system. Conventionally, without ambiguity, when writing a Pauli string matrix, we can omit the identity matrices, and it will be equivalent to write the above Pauli string matrix as  $Z_{2} \otimes Z_{3}$  (which, as an example, appears in the Hamiltonian of the quantum Ising model:  $\mathcal{H} = -\sum_{i=1}^{N} Z_{i} \otimes Z_{i+1} - h \sum_{i=1}^{N} X_{i}$ ). Pauli string can serve as the basis of writing the Hamiltonian, which is manifested by format of the Hamiltonian used in quantum chemistry:  $\mathcal{H} = \sum_{j=0}^{n_{P}} h_{j} P_{j}$  with  $n_{P}$  polynomial in  $N$ , where  $P_{j}$  are pauli strings, and  $h_{j}$  are the associated real coefficients.
In quantum computation, we have quantum gates parametrized by  $\theta$ . A common example is the single-qubit rotational gates  $R_{X}(\theta), R_{Y}(\theta), R_{Z}(\theta), 2 \times 2$ -matrices defined as
$$
R _ {X} (\theta) = \exp \left(- i \theta X / 2\right) = \left[ \begin{array}{c c} \cos \left(\theta / 2\right) & - i \sin \left(\theta / 2\right) \\ - i \sin \left(\theta / 2\right) & \cos \left(\theta / 2\right) \end{array} \right], \tag {5}
$$
$$
R _ {Y} (\theta) = \exp (- i \theta Y / 2) = \left[ \begin{array}{c c} \cos (\theta / 2) & - \sin (\theta / 2) \\ \sin (\theta / 2) & \cos (\theta / 2) \end{array} \right], \tag {6}
$$
$$
R _ {Z} (\theta) = \exp (- i \theta Z / 2) = \left[ \begin{array}{c c} \exp (- i \theta / 2) & 0 \\ 0 & \exp (i \theta / 2) \end{array} \right], \tag {7}
$$
where  $\theta \in \mathbb{R}$  is the rotational angle as the parameter of a rotational gate. In a quantum circuit, there can be a number of rotational gates acting on different qubits, and the parameters  $\theta$  in them can be chosen independently. All these components of  $\theta$  then get combined into a vector  $\pmb{\theta} \in \mathbb{R}^{n_{\mathrm{params}}}$ . Note that the space of  $\pmb{\theta}$  is different from the space of  $\psi$ .
The different qubits in the quantum circuit would still be disconnected with only single-qubit rotational gates. To connect the different qubits, the 2-qubit controlled gates, including controlled-  $X$ , controlled-  $Y$ , and controlled-  $Z$ , (with no parameter) are needed
$$
C X = \left[ \begin{array}{l l l l} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 \end{array} \right], \tag {8}
$$
$$
C Y = \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & - i \\ 0 & 0 & 1 & 0 \\ 0 & i & 0 & 0 \end{array} \right], \tag {9}
$$
$$
C Z = \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & - 1 \end{array} \right]. \tag {10}
$$
They are  $2^{2} \times 2^{2}$ -matrices that act on 2 qubits  $i, j$  out of the  $N$  qubits.
RealAmplitudes ansatz. The RealAmplitudes ansatz is a quantum circuit that can prepare a quantum state with real amplitudes. The implementation of RealAmplitudes in Qiskit is a parameterized  $R_{Y}$ -layer acting on all the  $N$  qubits and then repetitions of an entanglement layer of  $CX$  and a parameterized  $R_{Y}$ -layer. The number of repetitions is denoted as "reps". The total number of entanglement layers (with no parameters) is reps, and the total number of parameterized  $R_{Y}$ -layers is reps + 1. The total number of parameters is  $n_{\mathrm{params}} = N(\mathrm{rep} + 1)$ . The entanglement layers in our experiment are chosen as a circular configuration.
Hardware-efficient ansatz. We use the hardware-efficient ansatz following the convention of You et al. [87]. In each building block, there are an  $R_{X}$ -layer, an  $R_{Y}$ -layer, and the  $CZ$ -entanglement layer at odd links and then even links (acting on the state in this described order). Then there are in total repetitions of "depth" of such building blocks. In the end, there are  $2N \cdot$  depth parameters.
A.2 Overparameterization Theory
Recent development on overparameterization theories has shown that VQA with gradient-based optimization has convergence guarantee [37, 44, 87]. Since there are different assumptions behind different overparameterization theories, here we provide a brief introduction to the overparameterization theory in You et al. [87], and we refer the readers to the original paper for more details. The important insight of the overparameterization theory comes from that in large- $n_{\mathrm{params}}$  regime with proper learning rate, the dynamics of the wave function  $|\psi_{\theta}(t)\rangle$  from the parameterized quantum circuit is described by the following equation
$$
\frac {d \left| \psi_ {\boldsymbol {\theta}} (t) \right\rangle}{d t} = - \left[ \mathcal {H}, \left| \psi_ {\boldsymbol {\theta}} (t) \right\rangle \langle \psi_ {\boldsymbol {\theta}} (t) \right] \left| \psi_ {\boldsymbol {\theta}} (t) \right\rangle + \delta f \left(\left| \psi_ {\boldsymbol {\theta}} (t) \right\rangle\right), \tag {11}
$$
where  $\mathcal{H}$  is the Hamiltonian in a VQE task, and  $[ , ]$  is the commutator. The first term in the R.H.S. is the Riemannian gradient descent over the normalized wave function manifold with energy as the loss function and converges linearly to the ground state. This is also similar to the case of the quantum natural gradient. The second term in the R.H.S. is a small perturbation function  $\delta f$  of  $|\psi_{\theta}(t)\rangle$  (see the detailed form in You et al. [87]). It has been shown that in the overparameterization regime, the equation can still converge to the ground state under such perturbation. Similar to the argument in the quantum natural gradient case, the overparameterization theory provides an effective structure for Koopman learning with approximate linear dynamics.
B Details of Sec. 4 QuACK - Quantum-circuit Alternating Controlled Koopman Operator Learning
B.1 Further details of Neural DMD
Figure 5: Neural network architectures for our neural DMD approaches. The factor  $(d + 1)$  in the dimension  $(d + 1)n_{\mathrm{params}}$  is due to the sliding window embedding  $\Phi$ . (a) MLP bottleneck architecture with MSE loss for training. (b) CNN bottleneck architecture that operates on simulations as temporal and parameters as channel dimensions.
The neural network architectures for our neural DMD, i.e., MLP-DMD, MLP-SW-DMD, and CNN-DMD, are shown in Figure 5. For the CNN-DMD, we use an expansion ratio of 1 in the experiments.
**Optimization.** The parameters  $K$  and  $\alpha$  are trained jointly on  $\arg \min_{K,\alpha} \| \Theta(t_{d+1}) - K\Phi_{\alpha}(\Theta(t_0)) \|_F$ , from scratch with every new batch of optimization history by using the Adam optimizer for 30k steps with 9k steps of linear warmup from 0 to 0.001 and then cosine decay back to 0 at step 30k. We use the MSE loss, which minimizes the Frobenius norm.
Activation Along with ELU, we also explored cosine, ReLU and tanh activations. We found ELU to be the best, likely because: tanh suffers from vanishing gradients, ReLU biases to positive numbers (while input phases quantum circuit parameters  $\theta$  are unconstrained) and cosine is periodic.
The importance of learning rate scheduler. We train the neural network  $\Phi_{\alpha}$  from scratch every time we obtain optimization history as training data. It is important that we have a stable learning with well converging neural network at every single Koopman operator fitting stage. For that purpose, we found it vital to use a cosine-decay scheduler with a linear warmup, which is typically useful in the computer vision literature [46]. Namely, for the first 9k steps of the neural network optimization, we linearly scale the learning rate from 0 to 0.001, and then use a cosine-decay from 0.001 to 0 until the final step at 30k. In Sec. 6 for quantum machine learning, we use 160k training steps for CNN to achieve a better performance.
The importance of residual connections. In our work we use a residual connection in order to make DMD as a special case of the neural DMD parameterization. The residual connection is indeed
very useful, as it is driven by the Koopman operator learning formulation. Namely, the residual connection makes it possible for the encoder to learn the identity. If the encoder becomes the identity, then MLP(-SW)-DMD or CNN-DMD become vanilla (SW-)DMD.
The procedure for making predictions using neural DMD. Sec. 4 provides the general objective  $\arg \min_{K,\alpha}\| \Theta (t_{d + 1}) - K\Phi_{\alpha}(\Theta (t_0))\| _F$  for training the neural-network DMD including MLP-DMD, CNN-DMD, and MLP-SW-DMD. First, for MLP-DMD (and CNN-DMD with no sliding window), we take  $d = 0$  with no sliding window, so the objective gets reduced to  $\arg \min_{K,\alpha}\| \Theta (t_1) - K\Phi_\alpha (\Theta (t_0))\| _F$ . In the phase of training, the optimization history  $\pmb {\theta}(t_0),\pmb {\theta}(t_1),\dots,\pmb {\theta}(t_{m + 1})$  is first concatenated into  $\Theta (t_0)$  and  $\Theta (t_1)$  in the same way as in SWDMD using  $\Theta (t_k) = [\pmb {\theta}(t_k)\pmb {\theta}(t_{k + 1})\dots \pmb {\theta}(t_{k + m})]$ . In every column,  $\Theta (t_1)$  is one iteration ahead of  $\Theta (t_0)$  in the future direction. Then, in training, the operator  $\Phi_{\alpha} = \mathrm{NN}_{\alpha}$ , as a neural network architecture, acts only on  $\Theta (t_0)$  not on  $\Theta (t_1)$ .  $K$  is a square Koopman matrix that denotes a forward dynamical evolution from  $\Phi_{\alpha}\Theta (t_0)$  directly to  $\Theta (t_1)$ , rather than from  $\Phi_{\alpha}\Theta (t_0)$  to  $\Phi_{\alpha}\Theta (t_1)$ . Likewise, in the phase of inference for predicting the future of  $\pmb{\theta}$  beyond  $t_{m + 1}$ , we apply the operator  $K\Phi_{\alpha}$  repeatedly using the evolution  $\Theta (t_{k + 1}) = (K\Phi_{\alpha})^{k}\Theta (t_{1})$ , without an explicit inversion of the operator  $\Phi_{\alpha}$  to bring back the original representation. Next, for MLP-SW-DMD, we need to put  $d$  back to the equations and make the operator  $\Phi_{\alpha} = \mathrm{NN}_{\alpha}\circ \Phi$  a composition of the neural network architecture  $\mathrm{NN}_{\alpha}$  and the sliding window embedding  $\Phi$ . The Koopman operator  $K$  of MLP-SW-DMD has the same dimension as  $K$  of SW-DMD, which is non-square. The procedure of updating  $\Phi (\Theta (t))$  by adding the latest data and removing the oldest data is the same as in SW-DMD described in Sec. 4. The only difference between MLP-SW-DMD and SW-DMD is the additional neural network architecture  $\mathrm{NN}_{\alpha}$  in MLP-SW-DMD. The only difference between MLP-SW-DMD and MLP-DMD is the additional sliding window embedding  $\Phi$  in MLP-SW-DMD. The same relationship holds true for CNN-DMD between the cases of  $d = 0$  and  $d > 0$ .
B.2 The Alternating Controlled Scheme
Figure 6: Motivating examples for the alternating scheme and nonlinear embeddings. The results are from the 10-qubit quantum Ising model. Solid and dashed parts indicate true gradient steps and prediction steps respectively. In the starting regime of (a) where the lines almost overlap, the first 10 steps are solid for the DMD lines. In (b), the red points mark the optimal parameters for each piece of DMD predictions. The next piece of VQE starts from the optimal parameters rather than the last parameters, as is indicated by the red arrows, to guarantee the decrease of energy.
The Koopman operator theory is a powerful framework for understanding and predicting nonlinear dynamics through linear dynamics embedded into a higher dimensional space. By viewing parameter optimization on quantum computers as a nonlinear dynamical evolution in the parameter space, we connect gradient dynamics in quantum optimization to the Koopman operator theory. In particular, the quantum natural gradient helps to provide an effective structure of parameter embedding into a higher-dimensional space, related to imaginary-time evolution. However, for quantum optimization, using the standard dynamic mode decomposition (DMD) that assumes linear dynamics in optimization directly has the following issues demonstrated in Figure 6 of the 10-qubit quantum Ising model with  $h = 0.5$  learning rate 0.01. (1) In Figure 6a, the case of natural gradient, although the dynamics is
Figure 7: 5-qubit shot noise,  $n_{\mathrm{shots}} = 1,000$ . VQE with COBYLA is plotted in orange in addition to the baseline VQE with Adam and all the DMD methods in our QuACK. The COBYLA gets trapped.
approximately linear (as we discuss in main text), without using an alternating scheme, the DMD prediction is only good up to about 50 steps and starts to differ from the baseline VQE. This issue is much mitigated by adopting our alternating scheme by running follow-up true gradient steps. (2) In Figure 6b, even with the alternating scheme, in the case of Adam where the dynamics is less linear, the standard DMD method can start to diverge quickly. To mitigate this issue, we control our alternating scheme by starting the follow-up true gradient steps from the optimal parameters in prediction. In addition, we propose to use the sliding-window embedding and neural-networks to better capture the nonlinearity of dynamics.
From Theorem 5.1, the asymptotic behavior of DMD prediction for quantum optimization is trivial or unstable. This is manifested in Figure 6b, as the energy of DMD prediction diverges as the prediction time increases.
C An Example Comparing Gradient-Based and Gradient-Free Methods
While gradient-based methods and gradient-free methods are both applicable types of optimizers for VQAs, gradient-based methods use gradient information and thus can know better about the local geometry [39], especially with quantum Fisher information through quantum natural gradient. Particularly, the gradient-based method has been shown to converge for quantum optimization [74, 87].
In Figure 7, we show an example of the quantum Ising model with shot noise. While the gradient-based VQE with Adam finds a lower energy than COBYLA with  $\text{rhobeg} = 1.0$ , as COBYLA gets trapped. The results of Adam and QuACK are from Figure 12e. Our QuACK further improve upon Adam.
D Proofs of Theoretical Results in Sec. 5
Proof. As it is shown in Theorem 5.1, asymptotic DMD prediction could lead to trivial or unstable solution. Since QuACK employs the alternating controlled scheme, Theorem 5.2 shows that QuACK obtains the optimal prediction in each iteration. It implies that even the asymptotic prediction converges to trivial solution or oscillates, QuACK can take the best prediction among the sufficiently long DMD predictions to achieve superior performance.  $\square$
Corollary D.1. QuACK is guaranteed to converge for convex optimization on function  $f: \mathbb{R}^m \to \mathbb{R}$  that is convex and differentiable with gradient that is Lipschitz continuous of positive Lipschitz constant.
Proof. Since  $f$  has gradient that is Lipschitz continuous with positive Lipschitz constant, there exists some  $L > 0$  such that  $||f'(x) - f'(y)||_2 \leq L||x - y||_2$ . It has been shown that by choosing a fixed
step size  $\eta = 1 / L$ , the gradient descent is guaranteed to converge [56]. Each gradient step update from  $x_{k}$  is guaranteed to have  $f(x_{k + 1}) < f(x_k) - \frac{1}{2L} ||f'(x_k)||^2$  and after  $n$  gradient steps from  $x^{(0)}$
$$
f \left(x ^ {(n)}\right) - f \left(x ^ {*}\right) \leq \frac {\left| \left| x ^ {(0)} - x ^ {*} \right| \right| _ {2} ^ {2}}{2 n \eta} \tag {12}
$$
where  $x^{*}$  is the optimal solution. Since Theorem 5.2 shows that QuACK yields an equivalent or lower loss than  $n$ -step gradient descent and we discuss above that the convex function  $f$  with a positive Lipschitz constant can converge from any  $x^{(0)}$  with a proper step size  $\eta$ , it follows that QuACK is guaranteed to converge in the same setup.
$$
a \leq s \leq a \frac {f (p) \left(n _ {\text {s i m}} + n _ {\mathrm {D M D}}\right)}{f (p) n _ {\text {s i m}} + n _ {\mathrm {D M D}}}. \tag {13}
$$
To achieve  $\mathcal{L}_{\mathrm{target}}$ , the baseline VQA takes  $T_{b}$  gradient steps, and QuACK takes  $T_{Q,t} = T_{Q,1} + T_{Q,2}$  steps, where  $T_{Q,1}(T_{Q,2})$  are the total numbers of QuACK training (prediction) steps.  $s$  is the speedup ratio from QuACK.  $p \coloneqq n_{\mathrm{params}}$  is the number of parameters.
Proof. The total computational costs of the baseline and QuACK both contain two parts: classical computational cost and quantum computational cost. For the baseline gradient-based optimizer, the total computational cost is  $q n_{\mathrm{shots}} |B_q| f(p) T_b + c_b$ , where  $n_{\mathrm{shots}}$  is the number of quantum measurements per VQA example per gradient step per parameter,  $|B_q|$  is the batch size of VQA examples (e.g.,  $|B_q|$  is the number of training examples in the batch of QML, and is the number of terms in the Hamiltonian in VQE),  $q$  is the quantum computational cost per VQA example per shot per gradient step per parameter, and  $c_b$  is the total classical computational cost for the baseline, from processing the input and output of the quantum computer using a classical computer.  $c_b$  depends on the details of the VQA task, and for the tasks feasible on near-term quantum computers,  $c_b \ll q$  and thus can be neglected since the quantum resources are much more expensive than classical resources.  $f(p)$  is the optimizer factor for per gradient step evaluation on a quantum computer. For example, we have  $f(p) = 2p + 1$  for parameter-shift rules and  $f(p) \sim p^2 + p$  for quantum natural gradients. For QuACK, the total computational cost is  $q n_{\mathrm{shots}} |B_q| [f(p) T_{Q,1} + T_{Q,2}] + c_Q$ , where  $c_Q$  the total classical computational cost for QuACK, depending on the type of DMD method and the number of classical training steps for neural DMD, plus classical processing of the input and output of the quantum computer. Again, for near-term quantum computers,  $c_Q \ll q$  for the same reason as  $c_b$  and thus can be neglected. The QuACK training term has the factor  $f(p)$ , while the QuACK prediction term does not, because it does not involve taking gradients. The speedup ratio by QuACK is then
$$
\begin{array}{l} s = \frac {q n _ {\text {s h o t s}} | B _ {q} | f (p) T _ {b} + c _ {b}}{q n _ {\text {s h o t s}} | B _ {q} | [ f (p) T _ {Q , 1} + T _ {Q , 2} ] + c _ {Q}} \\ \approx \frac {q n _ {\text {s h o t s}} \left| B _ {q} \right| f (p) T _ {b}}{q n _ {\text {s h o t s}} \left| B _ {q} \right| \left[ f (p) T _ {Q , 1} + T _ {Q , 2} \right]} \tag {14} \\ = \frac {f (p) T _ {b}}{f (p) T _ {Q , 1} + T _ {Q , 2}} \\ = a \frac {f (p) \left(T _ {Q , 1} + T _ {Q , 2}\right)}{f (p) T _ {Q , 1} + T _ {Q , 2}} \\ \end{array}
$$
When deriving Eq. 14, the common factor  $q n_{\mathrm{shots}}|B_q|$  in the numerator and denominator is exactly the same, so its cancellation is exact. Since QuACK training always occurs before QuACK prediction, whether  $\mathcal{L}_{\mathrm{target}}$  is achieved during QuACK training or prediction, the general case is  $T_{Q,1} / T_{Q,2} \geq n_{\mathrm{sim}} / n_{\mathrm{DMD}}$ . Therefore,
$$
a \leq s \leq a \frac {f (p) \left(n _ {\text {s i m}} + n _ {\mathrm {D M D}}\right)}{f (p) n _ {\text {s i m}} + n _ {\mathrm {D M D}}}. \tag {15}
$$
In the limit  $n_{\mathrm{iter}} \to \infty$ , the location (measured in terms of the number of QuACK steps) of the last QuACK step does not affect  $T_{Q,1} / T_{Q,2}$  much, and we have  $T_{Q,1} / T_{Q,2} \rightarrow n_{\mathrm{sim}} / n_{\mathrm{DMD}}$ , so the upper bound in Eq. 13 can be achieved.
E Detailed Information on Sec. 6 Experiments
E.1 Experimental Setup Details
We use the notation  $T_{b,t}$  as the total number of pure VQA (baseline) gradient steps in the plots, and  $n_{\mathrm{SW}}$  as the sliding-window size (equal to  $d + 1$ ).  $n_{\mathrm{iter}}$  is the number of repetitions of alternating VQA+DMD runs, which is chosen large enough to ensure convergence of the baseline VQA. When convergence is achieved, the performance of QuACK does not have a strong dependence on choice of  $n_{\mathrm{iter}}$ .
E.1.1 Quantum Ising Model Setup
For the quantum Ising model Hamiltonian  $\mathcal{H} = -\sum_{i=1}^{N} Z_i \otimes Z_{i+1} - h \sum_{i=1}^{N} X_i$ , we use the periodic boundary condition, such that  $i = 1$  and  $i = N + 1$  are identified.
In Sec. 6.2 Quantum Natural Gradient, we use the circular-entanglement RealAmplitudes ansatz and reps=1 (2 layers,  $2N$  parameters) with  $T_{b,t} = 800$ , quantum natural gradient optimizer, learning rate 0.001. For the QuACK hyperparameters, we choose  $n_{\mathrm{sim}} = 4$  and  $n_{\mathrm{DMD}} = 100$  with  $n_{\mathrm{iter}} = 8$ . The random sampling of initialization of  $\theta$  is from a uniform distribution in  $[0,1)^{n_{\mathrm{params}}}$ .
In Sec. 6.3, we use the hardware-efficient ansatz with 250 layers (500N parameters) with  $T_{b,t} = 5000N$ , gradient descent optimizer, learning rate 5e-6. For the QuACK hyperparameters, we choose  $n_{\mathrm{sim}} = 4$  and  $n_{\mathrm{DMD}} = 1000$  with  $n_{\mathrm{iter}} = 5N$  to ensure convergence.
In Sec. 6.4, we use the circular-entanglement RealAmplitudes ansatz and  $\text{refs} = 1$  (2 layers,  $2N$  parameters) with  $T_{b,t} = 1500$ , Adam optimizer, learning rate 2e-3. For the QuACK hyperparameters, we choose  $n_{\mathrm{sim}} = 3$  and  $n_{\mathrm{DMD}} = 60$  with  $n_{\mathrm{iter}} = \left[ \frac{4T_{b,t}}{(n_{\mathrm{sim}} + n_{\mathrm{DMD}})} \right] = 96$  to ensure convergence. Some examples have an earlier stop, which does not affect calculation of the speedup ratio since they have already achieved  $\mathcal{L}_{\mathrm{target}}$  before 96 pieces of VQE+DMD.
In Sec. 6.5, we use the circular-entanglement RealAmplitudes ansatz for the 12-qubit quantum Ising model and  $\mathrm{rep} = 1$  (2 layers,  $2N = 24$  parameters) with  $T_{b,t} = 300$  learning rate 0.01. For the QuACK hyperparameters, we choose  $n_{\mathrm{sim}} = 5$  and  $n_{\mathrm{DMD}} = 40$  with  $n_{\mathrm{iter}} = 12$  to ensure convergence. We have the sliding-window size  $n_{\mathrm{SW}} = 3$  for SW-DMD, MLP-SW-DMD, and CNN-DMD.
E.1.2 Quantum Chemistry Setup
A molecule of LiH, depicted in Figure 3a, consists of a lithium atom and a hydrogen atom separated by a distance. We use the quantum chemistry module from Pennylane [6] to obtain the 10-qubit Hamiltonian of LiH at an interatmoic separation 2.0 with 5 active orbitals. We use the circular-entanglement RealAmplitudes ansatz and reps=1 (2 layers, 20 parameters). The optimizer is Adam with the learning rate 0.01. We perform  $T_{b,t} = 1000$  baseline VQE iterations. We choose  $n_{\mathrm{sim}} = 5$ ,  $n_{\mathrm{DMD}} = 40$ ,  $n_{\mathrm{iter}} = 12$ . The sliding-window size is  $n_{\mathrm{SW}} = 3$  for SW-DMD, MLP-SW-DMD, and CNN-DMD.
E.1.3 QML Architecture and Training Details
In our QML example in Sec. 6, the quantum computer has  $N = 10$  qubits. The architecture is shown in Figure 8. For the MNIST binary classification task, each image is first downsampled to  $16 \times 16$  pixels, and then used as an input  $x \in [0,1]^{256}$  that is fed into an interleaved encoding quantum gate.. The parameters  $\theta$  are also encoded in the interleaved encoding quantum gate. Then the quantum measurements are used as the output for computing the cross-entropy loss.