Exploring experimental limit of deep quantum signal processing using a trapped-ion simulator J.-T. Bu, Lei Zhang, Zhan Yu, Jing-Bo Wang, W.-Q. Ding, W.-F. Yuan, B. Wang, H.-J. Du, W.-J. Chen, L. Chen, J.-W. Zhang, J.-C. Li, F. Zhou, Xin Wang, M. Feng Abstract Quantum signal processing (QSP), which enables systematic polynomial transformations on quantum data through sequences of qubit rotations, has emerged as a fundamental building block for quantum algorithms and data re-uploading quantum neural networks. While recent experiments have demonstrated the feasibility of shallow QSP circuits, the inherent limitations in scaling QSP to achieve complex transformations on quantum hardware remain an open and critical question. Here we report the first experimental realization of deep QSP circuits in a trapped-ion quantum simulator. By manipulating the qubit encoded in a trapped Ca + 43 {}^{43}\textrm{Ca}^{+} ion, we demonstrate high-precision simulation of some prominent functions used in quantum algorithms and machine learning, with circuit depths ranging from 15 to 360 layers and implementation time significantly longer than coherence time of the qubit. Our results reveal a crucial trade-off between the precision of function simulation and the concomitant accumulation of hardware noise, highlighting the importance of striking a balance between circuit depth and accuracy in practical QSP implementation. This work addresses a key gap in understanding the scalability and limitations of QSP-based algorithms on quantum hardware, providing valuable insights for developing quantum algorithms as well as practically realizing quantum singular value transformation and data re-uploading quantum machine learning models. Fig 1: A schematic overview of using a single trapped ion to evaluate experimental limitation of QSP. (Left panel) QSP finds extensive applications across various problems ranging from quantum computing to quantum machine learning tasks. The target algorithm is reduced to a task of simulating function f . Here it is listed as examples that amplitude amplification aligns with a linear function, Hamiltonian simulation corresponds to an evolution function, and solving linear equations requires an inverse function. Then the simulation process is divided into following four steps ( a , b , c , d ), which connect quantum computing to quantum machine learning. (a) The truncated Fourier series is computed for optimal approximation. (b) The QSP circuit simulating f is implemented using laser and microwave sequences, from the end of the sideband cooling to the final detection. (c) The ion trap and the level scheme of the {}^{43}\textrm{Ca}^{+} ion, where the trap’s axial and radial frequencies are respectively, \omega_{z}/2\pi=1.2 MHz and \omega_{r}/2\pi=1.5 MHz, and the qubit is encoded in the stretched states of the hyperfine ground state, i.e., |0\rangle=|4S_{1/2},F=4,m_{F}=4\rangle and |1\rangle=|4S_{1/2},F=3,m_{F}=3\rangle , where F and m_{F} represent total angular momentum and magnetic quantum number. A 3.2 GHz microwave couples the two encoded states for unitary operation. Laser cooling, optical pumping, and state measurement are performed with 397 nm and 729 nm lasers. (d) By analyzing the characteristic damping signals and comparing with the target function, the simulation error of this QSP circuit is incorporated back into the quantum algorithm to determine its error bounds. I Introduction Quantum computing, an emerging and pivotal field, holds immense promise for applications across various scientific domains, including cryptography [ 1 ] , database searching [ 2 ] , and machine learning [ 3 , 4 , 5 , 6 , 7 ] . By leveraging the inherent properties of quantum mechanics, such as superposition and entanglement, these algorithms can process complex computational problems, offering substantial advantages over their classical counterparts [ 8 , 9 , 10 , 11 , 12 ] . Recent advancements in quantum computing indicate that quantum signal processing (QSP) [ 13 ] is poised to be a basic toolbox for mainstream quantum algorithms. One example is the framework of quantum singular value transformation (QSVT) [ 14 ] . By applying QSP to invariant subspaces of input data, QSVT unifies a wide range of well-established quantum algorithms [ 15 ] , including those designed for amplitude amplification [ 14 ] , Hamiltonian simulation [ 16 , 17 , 18 , 19 ] , and solving of linear systems’ equations [ 14 ] . This framework can be further employed to develop novel quantum algorithms that address computational tasks, such as quantum phase estimation [ 15 , 20 , 21 ] and quantum entropy estimation [ 20 , 22 , 23 , 24 ] . Beyond the quantum computing perspective, QSP has also emerged as a crucial tool in the field of quantum machine learning [ 4 ] . The structure of QSP is widely used in designing quantum neural networks (QNNs) to yield quantum advantage. In particular, the single-qubit data re-uploading QNN [ 25 , 26 ] can universally approximate univariate functions [ 27 ] . This QSP-like structure has been further used to construct multi-qubit QNNs that could universally approximate multivariate functions [ 28 ] . Apart from directly constructing QNNs, quantum machine learning algorithms, e.g., quantum transformer [ 29 ] , can implement classical neural networks on a quantum computer, in which QSP is required to simulate activation functions of neural networks. However, implementing QSP-based quantum algorithms remains challenging due to constraints from existing hardware [ 30 , 31 , 32 ] , such as expensive gate cost and non-negligible noise factors [ 33 , 34 ] . As the common ground of these algorithms, it is essential to comprehend the empirical efficacy of the QSP components. The experimental fidelity not only influences the precision of polynomial transformation in quantum algorithms, but also affects the expressivity of QSP-based QNN models. Exploiting experimental limitations [ 35 ] of the QSP will provide valuable insight into the practicality of these algorithms within the confines of quantum hardware. The initial QSP experiment [ 36 ] implemented a simplified QSVT structure to evaluate quantum device performance under noises. Subsequent research works have utilized QSP circuits for Hamiltonian simulation [ 37 ] and channel discrimination [ 38 ] in trapped-ion systems. Despite those achievements, the current depths of QSP circuits remain shallow. Then an open question persists: to what extent can quantum algorithms reliably handle sophisticated transformations in quantum devices? These transformations, while significant, often exhibit singularities that cannot be approximated by low-degree polynomials. The absence of such experiments necessitates a deeper exploration for practical performance capability of QSP-based algorithms [ 39 , 40 ] . In this work, we address this open question by investigating a tight bound for experimental errors in implementing QSP-based algorithms in the case of noise-free quantum data. Notably, our method is independent of the qubit cost of the target algorithm, with any QSP-based algorithm to be reduced to a function simulation task with only single-qubit implementation required. To showcase its effectiveness, we present the first experimental realization of deep QSP circuits in a trapped-ion quantum simulator, demonstrating the accurate execution of three important functions with singularities. By exploiting the experimental depth of these QSP circuits, our experiments demonstrate that, within an appropriate time that far exceeds the dephasing time of the system, the average experimental error within deep QSP circuits can be exponentially suppressed. We also identify two main sources of error and analyze their effects in deep QSP circuits. These experiments offer reliable references for assessing the fidelity of simulating deep QSP-based algorithms in ion-trap devices. II Quantum signal processing The concept of quantum signal processing (QSP) can be traced back to the seminal work of Low et al. [ 13 ] , who demonstrated that interleaving rotation gates can facilitate polynomial transformations of an input scalar x . By encoding a polynomial P into the rotation angles, QSP simulates its performance P(x) through the expectation value by measuring the qubit [ 15 , 27 ] . QSP can be further extended to multi-qubit frameworks [ 20 , 41 , 42 , 43 ] , empowering quantum circuits to simulate polynomial transformation of input matrix data. Many quantum algorithms can be interpreted as univariate function transformations applied to input data. QSP and its multi-qubit extension provide quantum approaches to simulate these functions and beyond. As listed in the left panel of Figure 1 , each algorithm can be reduced to a task of simulating a square-integrable function f\mathrel{\mathop{\mathchar 58\relax}}{{\mathbb{R}}}\to{{\mathbb{C}}} . Notably, amplitude amplification corresponds to a linear function f(x)=ax ; Hamiltonian simulation equates to an evolution function f(x)=e^{-ixt} ; solving linear systems needs an inverse function f(x)=x^{-1} . By approximating f with a polynomial expansion, such as Fourier expansion [ 44 ] , one can construct a QSP-based circuit to simulate f and address the corresponding problem. Nevertheless, the performance of such deep extensions on real quantum devices remains largely unexplored, while verifying a QSP-based algorithm directly would be prohibitively expensive. This raises a natural question: how effectively can we evaluate the performance of QSP-based circuits without conducting experiments that may require hundreds of qubits? Here, we propose a method that uses only a single qubit to explore the limitations of QSP-based algorithms on NISQ devices. The approach involves first distilling the single-qubit QSP circuit from the algorithm and then carrying out the qubit-experiment. The experimental simulation error of this single-qubit circuit provides a lower bound for the experimental error in its multi-qubit extension, and such bound is tight when the signal unitary is noise-free. This method is rigorously supported by the following theorem, whose formal statement and proof are deferred to Appendix C . Theorem 1 (Single-qubit QSP governs the error, informal) Let {E_{\operatorname{QSP}}} be the experimental simulation error of a single-qubit QSP circuit. Then the simulation error of its multi-qubit extension {E_{\operatorname{QSP-EXT}}} with noise-free signal unitary satisfies {E_{\operatorname{QSP-EXT}}}={\cal O}({E_{\operatorname{QSP}}}) . In other words, when the signal unitary encoding the quantum data is noise-free, single-qubit experiments are sufficient to verify the performance of complex QSP-based algorithms. On the other hand, if the signal unitary is noisy, these experiments still provide a necessary condition for the successful implementation of these algorithms: if the single-qubit experiment fails, the multi-qubit extension will also fail. In the rest of this paper, we will demonstrate the feasibility of our proposed method. Regarding the construction, QSP has various conventions depending on the choice of signal processing unitaries and the signal unitary [ 14 , 45 , 46 , 27 , 47 ] . Here we consider implementing trigonometric QSP, a variant noted for its good polynomial expressiveness using a single qubit [ 27 ] . The circuit is given as W(x)=A(\theta_{0},\phi_{0})\prod_{j=1}^{L}R_{z}(x)A(\theta_{j},\phi_{j}) (1) for A(\theta,\phi)=R_{y}(\theta)R_{z}(\phi) . As shown in Fig. 1 , each signal processing unitary A(\theta_{j},\phi_{j}) has been translated into a parameterized microwave sequence. Additionally, we encode the function variable x into a R_{z}(x) gate within each signal processing block using a data re-uploading process. The accuracy parameters in the signal processing unit can be trained using classical optimization methods such as gradient descend or quasi-Newton formula. III Experimental system and results We accomplish the deep QSP circuits experimentally with a trapped {}^{43}\textrm{Ca}^{+} ion in a linear Paul trap. The {}^{43}\textrm{Ca}^{+} ion possesses an electronic spin-1/2 and a nuclear spin-7/2, exhibiting rich level structure. The ground-state hyperfine levels of the {}^{43}\textrm{Ca}^{+} ion own a smaller inherent magnetic moment, rendering them less sensitive to magnetic field fluctuations in the environment [ 48 , 49 , 50 , 51 , 52 ] . This results in longer coherence time, which is beneficial to enhance the performance of quantum simulator. Prior to experimental operations, we have accomplished Doppler cooling and resolved sideband cooling for the ion, yielding the final average phonon number \bar{n}< 0.1 along the axial direction with the Lamb-Dicke parameter \eta\sim 0.1. Together with the optical pumping, the system is initially prepared in |0\rangle . Then we carry out the unitary rotations between the two encoded levels and implement projective measurement by electron shelving technique. More details are deferred to Appendix D . Fig 2: Experimental results for simulating STEP, SELU, and ReLU functions with the layers set as L=15 , 180 , and 360 . The horizontal axis is the input signal ranging from -\pi to \pi , and the vertical axis represents function values. The solid lines represent the classical simulation results, and the data points are obtained from experimental observation. Each data point is the average value of 10^{5} trials, with error bars representing the associated standard deviation. For our purpose, the light-matter interaction is given by the Hamiltonian in units of \hbar=1 , H=\frac{1}{2}\Omega(t)e^{i\varphi(t)}|e\rangle\langle g|+\rm H.C., (2) which can be achieved in the {}^{43}\textrm{Ca}^{+} ion by microwave irradiation under carrier transitions. \Omega(t) and \varphi(t) are time dependent, representing the driving amplitude (i.e., Rabi frequency) and the phase of the microwave, respectively. The single-qubit rotation gates R_{y}(\theta) and R_{z}(\phi) required by Eq. ( 1 ) can be executed using Eq. ( 2 ) by elaborately controlling \Omega(t) and \varphi(t) . To illustrate the experimental capabilities of QSP, we exemplify three representative functions, i.e., the STEP, SELU and ReLU for implementation. These functions hold significant importance in the realms of quantum algorithms and machine learning. For example, simulating the STEP function enables binary classification of input quantum data, to achieve complexity improvements on the quantum phase estimation problem [ 15 , 20 , 21 ] . From the machine learning perspective, the three activation functions, i.e., STEP, SELU, and ReLU, enable neural network models to become powerful function approximators [ 53 ] that can satisfy the universal approximation theorem [ 54 ] . To distinguish between inherent algorithmic limitations and hardware-induced errors, we also perform classical simulations of noise-free QSP circuits as a comparison to the experimental observation. For clarity, we refer to the experimental implementation as ‘quantum simulation’. Figure 2 illustrates the behavior of quantum simulation for three representative layers with respect to the classical simulation, as below. L=15 : Both classical and quantum simulations show limited accuracy, merely approximating the general shape of the function. The observed oscillations in function values result from an insufficient Fourier series expansion, indicating the need for increasing the layer count in order to improve the simulation fidelity. L=180 : Simulation accuracy improves significantly with the increase of the layer count, reaching optimal performance at this configuration. However, this improvement comes at the cost of additional computational resources, with each layer requiring seven extra microwave pulses [ 55 ] . L=360 : While classical simulations continue to improve in accuracy with additional layers, performance of the quantum simulation shows a marked decline. Notably, the accuracy of the quantum simulation at this setup regresses to levels comparable to those observed when L ranges from 30 to 90. IV Error analysis The experimental results reveal an intriguing relationship between the experimental deviation and the circuit depth. To explore the impact of noise factors, we assess the accuracy of simulations using the mean square errors (MSEs) with respect to the ideal function, where MSEs is defined as below. \operatorname{MSEs}=\sum_{n=1}^{N}|W_{L}(x_{n})-f(x_{n})|^{2}/N. (3) Here W_{L}(x_{n}) and f(x_{n}) are, respectively, the results of measurement (or calculation) and the ideal function. By summing the errors over N variables and taking their average, the MSEs for L layers can be determined. In contrast, we treat the experimental statistical errors as the standard deviation, which reflects how much the measurement values spread out from the average. The standard deviation is acquired by measuring the same quantity repeatedly, and labeled as error bars. Fig 3: Mean square errors (MSEs) on the logarithmic scale calculated from the results of theoretical computation and experimental observation of the QSP circuits relative to ideal function values, with layer counts ranging from 15 to 360. Theoretical MSEs are estimated by extensive sampling of classically simulated QSP circuits, while quantum simulation MSEs are based on a limited number of experimental data points for efficiency. In Figure 3 , we evaluate quantum simulation by sampling input signals across ten different QSP circuit layer configurations. The theoretical MSEs serve as a benchmark for achievable precision, revealing an intriguing relationship between experimental MSEs and circuit depth. When the circuit is shallow, simulation accuracy is relatively low. However, since the quantum device maintains strong coherence and the accumulated errors from quantum state manipulation are minimal, the MSEs from both simulations are very close. With the number of layers starting to increase, the experimental MSEs rapidly decrease towards zero, aligning with theoretical MSEs. This phenomenon can be well explained by the Fourier convergence theorem [ 56 ] . Beyond 180 layers, however, the experimental MSEs begin to increase, deviating from the expected trend and reaching the minimum simulation error. This decline stems from two primary sources, i.e., the operational errors caused by imprecise implementation, and the dephasing errors due to time-dependent decoherence. These factors create a trade-off between QSP circuit layers and simulation accuracy. To further understand this trade-off, we classically simulate two error models based on operational and dephasing errors in the QSP circuits, tested by varying angle error rates and coherence error rates. By comparing the performance of these classically-simulated noisy QSP circuits with noise-free ones, we observe that (1) operational error is the primary source of error in the case of shallow depth, but its impact diminishes to become exponentially insignificant as depth increases to 200; (2) dephasing error is negligible in the shallow depth case but becomes exponentially significant as depth increases. These observation contributes to the kinks presented in Figure 3 . More discussions on these two error models are detailed in Appendix C . These phenomena can be explained by the nature of QSP circuits. In a QSP circuit, the n -th signal processing unitary governs the coefficient of the n -th term. Since our QSP circuits simulate polynomial expansions, the coefficients of the initial terms dominate the function value when the circuit is shallow. In this case, the operational error, affecting the signal processing unitary and thus the coefficients of expansion terms, is the main source of error. With the increase of the layer count, the significance of the affected coefficients decreases exponentially, so does the error itself. In contrast, dephasing error becomes predominant. The exponential increase in dephasing error occurs as it attempts to evolve the target state to the mixed state with reduced coherence [ 55 ] , counteracting the exponential decay process achieved by increasing layers, thus increasing the MSEs exponentially. Therefore, we consider that the two distinct noise factors exhibit contrasting behaviors as circuit depth increases, indicating a trade-off to carefully balance the circuit depth against the system’s decoherence time. Such considerations will be crucial for future implementations of QSP-based algorithms and quantum neural networks. V Concluding remarks In summary, we have proposed a method for implementing QSP-based algorithms in an ion-trap system, for which we justified that using a single-qubit one can acquire the lower bound of simulation error for complex QSP-based algorithms. Then we have experimentally carried out high-precision QSP circuits in a trapped {}^{43}\textrm{Ca}^{+} ion. Utilizing quantum circuits with depths of up to 360 layers, we have executed three complex functions with singularities, confirming the potential of implementing complex QSP-based algorithms in quantum hardware. In particular, simulating the STEP function in QSVT helps unify and improve the solution of quantum estimation problems, while simulating activation functions, such as the STEP, ReLU, and SELU functions, forms a fundamental component for large-scale QNNs to achieve universal approximation. Hence, our experimental implementation of high-accuracy QSP of these functions establishes the groundwork and highlights the potential for further experimental realization of QSVT algorithms and QNNs in a trapped-ion quantum simulator. The QSP can be extended to multi-qubit systems that encodes quantum data [ 57 , 58 ] instead of a scalar. This extension allows QSP to perform function transformations on the encoded data, thereby serving as a ground component in the design of new quantum algorithms and circuit architectures. However, the performance of such deep extensions on real quantum devices remains unexplored. With current technologies, verifying a QSP-based algorithm with signal unitaries extended to hundreds of qubits seems prohibitively expensive. Nevertheless, the evaluation method and experiment analysis presented in this work can serve as reliable references for high-precision QSVT and data re-uploading QNN implementations, paving the way for practical applications in various domains. With further improving experimental conditions, this applications are anticipated to be constructed using deeper circuits, and hence can be leveraged to tackle challenging tasks in quantum simulation, quantum linear algebra, and quantum machine learning in the future. Appendix A Supplementary experimental data In this section, we present additional experimental results not included in the main text, which help further understand the performance of QSP circuits. Fig 4: Experimental results for the STEP function. (a)-(f) Simulation results for L=30, L=60, L=120, L=240, L=300, L=330, respectively. Fig 5: Experimental results for the SELU function. (a)-(f) Simulation results for L=30, L=60, L=120, L=240, L=300, L=330, respectively. Fig 6: Experimental results for the ReLU function. (a)-(f) Simulation results for L=30, L=60, L=120, L=240, L=300, L=330, respectively. Appendix B Review of Trigonometric QSP Our work is based on one QSP variant known as trigonometric QSP [ 27 ] , which distinguishes itself by its capability to realize general polynomial transformations using a single qubit, without resorting to other techniques such as the linear combinations of unitaries (LCU) [ 59 ] . Construction of this QSP circuit involves a sequence of signal processing unitaries A\left(\theta_{j},\phi_{j}\right)=R_{y}(\theta_{j})R_{z}(\phi_{j}) interleaved with a signal unitary R_{z}(x) , given as W(x)=R_{z}(\omega)A(\theta_{0},\phi_{0})\prod_{j=1}^{L}R_{z}(x)A(\theta_{j},\phi_{j}), (B.1) where L is the degree of function approximation, and R_{z}(\omega) appearing at the end of QSP circuit is often omitted in practical implementation. The following Lemma characterizes the power of trigonometric QSP. Lemma 2 (Lemma 3 in [ 27 ] ) There exist \omega\in{{\mathbb{R}}} , \bm{\theta}\in{{\mathbb{R}}}^{L+1} and \bm{\phi}\in{{\mathbb{R}}}^{L+1} such that W_{\omega,\bm{\theta},\bm{\phi}}(x)=\begin{bmatrix}P(x)&-Q(x)\\ Q^{*}(x)&P^{*}(x)\end{bmatrix}, (B.2) if and only if Laurent polynomials P,Q\in{{\mathbb{C}}}\left[e^{ix/2},e^{-ix/2}\right] satisfy the following conditions, 1. \deg(P) , \deg(Q)\leq L , 2. P and Q have parity L\bmod 2 , 3. \forall x\in{{\mathbb{R}}} , \lvert P(x)\rvert^{2}+\lvert Q(x)\rvert^{2}=1 . The parity condition, as delineated in Condition 2 and characterized by binary values of 0 and 1 , imposes a restriction on the allowable range of polynomial transformations for QSP circuits. Generally, for a Laurent polynomial P belonging to the space {{\mathbb{C}}}\left[z,z^{-1}\right] , the parity is defined as 0 when all the coefficients corresponding to the odd powers of z are nullified, and the parity is identified as 1 when all coefficients associated with even powers of z are nullified. This parity constraint is a commonality across various established QSP conventions, necessitating the use of the LCU technique when seeking to implement generic polynomial transformations in QSP-based algorithms. In contrast, trigonometric QSP can circumvent the parity constraint. This is achieved by restricting the scope of expressivity from {{\mathbb{C}}}\left[e^{ix/2},e^{-ix/2}\right] to a smaller field {{\mathbb{C}}}\left[e^{ix},e^{-ix}\right] , i.e., the set of trigonometric polynomials . Note that the definition of the degree function in {{\mathbb{C}}}\left[e^{ix},e^{-ix}\right] differs from that in {{\mathbb{C}}}\left[e^{ix/2},e^{-ix/2}\right] . The implication of this restriction is summarized in the subsequent statement. Lemma 3 (Lemma 4 in [ 20 ] ) Suppose F\in{{\mathbb{C}}}\left[e^{ix},e^{-ix}\right] is normalized and real-valued with degree L . There exists P,Q\in{{\mathbb{C}}}\left[e^{ix/2},e^{-ix/2}\right] such that \lvert P(x)\rvert^{2}-\lvert Q(x)\rvert^{2}=F(x) . Furthermore, there exist \omega\in{{\mathbb{R}}} , \bm{\theta}\in{{\mathbb{R}}}^{L+1} and \bm{\phi}\in{{\mathbb{R}}}^{L+1} such that |\psi(x)\rangle=W_{\omega,\bm{\theta},\bm{\phi}}(x)|0\rangle satisfies \langle\psi(x)|Z|\psi(x)\rangle=F(x). (B.3) Using the fact that trigonometric polynomials can approximate square-integrable functions through Fourier expansion, one can eventually confirm the universal approximation properties of trigonometric QSP. When the polynomial transformation is known, we shorthand the trigonometric QSP circuit as W(x) for convenience of discussion. Theorem 4 (Theorem 4 in [ 27 ] ) For any univariate square-integrable function f\mathrel{\mathop{\mathchar 58\relax}}[-\pi,\pi]\to[-1,1] and for all \varepsilon>0 , there exists a trigonometric QSP circuit W(x) such that |\psi(x)\rangle=W(x)|0\rangle satisfies \lVert\langle\psi(x)|Z|\psi(x)\rangle-f(x)\rVert\leq\varepsilon. (B.4) It is worth noting that when f can be expressed by a convergent Fourier series, the precision will increase exponentially as the depth of W(x) increases. This theory is supported by the experiments conducted in our work. The limits of trigonometric QSP could be representative of all types of single-qubit QSP experiments. QSP conventions can be classified into two classes: Chebyshev-based conventions [ 13 , 14 ] that simulate polynomials and Fourier-based conventions [ 45 , 46 , 27 ] that simulate trigonometric polynomials. Trigonometric QSP, as a Fourier-based convention, can express all trigonometric polynomials using a single-qubit, and can be converted to other QSP conventions as shown below \begin{array}[]{ccccc}{{\mathbb{C}}}\left[e^{ix/2},e^{-ix/2}\right]&\Longrightarrow&{{\mathbb{R}}}\left[e^{ix/2},e^{-ix/2}\right]&\Longleftrightarrow&{{\mathbb{C}}}[x]\\ \textrm{ trigonometric QSP }&\xrightarrow{\textrm{let }\omega,\phi_{j}=0}&\textrm{ QSP in Ref.~\cite[cite]{[\@@bibref{Number}{haah2019product, chao2020finding}{}{}]} }&\xleftrightarrow{\textrm{add $H$ on both sides }}&\textrm{ QSP in Ref.~\cite[cite]{[\@@bibref{Number}{low2016methodology, gilyen2019quantum}{}{}]} }\end{array} (B.5) The details of these conversions are deferred to previous works [ 27 , 15 ] . B.1 QSP circuits for STEP, SELU and ReLU This section illustrates how to construct the trigonometric QSP circuits for STEP, SELU and ReLU functions. First, we provide the definitions of these three functions. Note that SELU and ReLU are normalized so that their range is restricted to [-1,1] . Definition 1 For x\in[-\pi,\pi] , the STEP , SELU [ 60 ] and ReLU [ 61 ] functions are defined as \displaystyle\operatorname{STEP}(x) \displaystyle=\begin{cases}1,x\geq 0;\\ -1,x<0.\end{cases} (B.6) \displaystyle\operatorname{SELU}(x) \displaystyle=\frac{1}{\pi}\begin{cases}x,x\geq 0;\\ \alpha\left(e^{x}-1\right),x<0.\end{cases} (B.7) \displaystyle\operatorname{ReLU}(x) \displaystyle=\frac{1}{\pi}\begin{cases}x,x\geq 0;\\ 0,x<0.\end{cases} (B.8) where \alpha=1.6733 for the SELU function. The QSP circuits were computed using Paddle Quantum [ 62 ] . Since \operatorname{SELU} and \operatorname{ReLU} are continuous within the interval (-\pi,\pi) , these functions can be directly approximated through truncated Fourier expansion. For each function, the built-in function laurent_generator is utilized to determine its approximated trigonometric polynomials F . Subsequently, the corresponding QSP circuit in Lemma 3 is constructed by employing the built-in functions pair_generation and qpp_angle_approximator . The simulation of \operatorname{STEP} is more complicated due to its jump discontinuity at x=0 , which exacerbates the so-called Gibbs phenomenon [ 63 ] : the truncated Fourier expansion will exhibit heavy oscillations near the jump discontinuity. To mitigate this issue, it is observed that the STEP function can be expressed as the limit of a continuous function, \operatorname{STEP}(x)=\frac{2}{\pi}\lim_{N\to\infty}\arctan\left(Nx\right). (B.9) Therefore, the STEP function can be approximated by simulating \frac{2}{\pi}\arctan\left(Nx\right) for sufficiently large N (which is chosen to be 100 in this work). B.2 Multi-qubit extension Let f\mathrel{\mathop{\mathchar 58\relax}}[-\pi,\pi]\to[-1,1] be a square-integrable function. We can extend the domain of f to the unitary group by applying f on the eigenphases of these unitaries. Such extension is defined as follows: Definition 2 (Eigenphase transformation) Let U be a unitary operator with spectral decomposition U=\sum_{j}e^{i\tau_{j}}|\chi_{j}\rangle\langle\chi_{j}| . The eigenphase transformation of U under f , denoted as f(U) , is defined as f(U)=\sum_{j}f(\tau_{j})|\chi_{j}\rangle\langle\chi_{j}|. (B.10) When f(x)=\sum_{j}c_{j}e^{ijx} is a trigonometric polynomial, f(U)=\sum_{j}c_{j}U^{j} is simply a polynomial of U . This is where quantum phase processing (QPP) [ 20 ] comes into play. QPP further develops the trigonometric QSP by extending the input scalar signal to 2^{n} eigenphases of n -qubit unitary. By using an ancilla qubit as the control register, QPP queries the controlled input signal unitary to perform polynomial transformations on its eigenphases. The QPP circuit for simulating degree- L trigonometric function F is constructed as V_{\omega,\bm{\theta},\bm{\phi}}(U)\coloneqq R_{z}(\omega)_{\operatorname{aux}}A\left(\theta_{0},\phi_{0}\right)_{\operatorname{aux}}\left[\prod_{l=1}^{L}\begin{bmatrix}U^{\dagger}&0\\ 0&I^{\otimes n}\end{bmatrix}A\left(\theta_{2l-1},\phi_{2l-1}\right)_{\operatorname{aux}}\begin{bmatrix}I^{\otimes n}&0\\ 0&U\end{bmatrix}A\left(\theta_{2l},\phi_{2l}\right)_{\operatorname{aux}}\right], (B.11) where A\left(\theta_{j},\phi_{j}\right)_{\operatorname{aux}} is applied on the ancilla qubit. We shorthand the QPP circuit as V(U) for simplification. One can show that QPP circuit essentially performs polynomial transformations on the eigenspaces of input unitary. Lemma 2 in Ref. [ 20 ] shows that ~V(U)=\begin{bmatrix}P(U)&-Q(U)\\ Q^{*}(U)&P^{*}(U)\end{bmatrix}, (B.12) where P,U are Laurent polynomials given in Lemma 3 . Appendix C Detailed Error Analysis The simulation error of QSP circuits for a target function f can be decomposed into three components: - polynomial approximation error arises when f is not a polynomial, requiring approximation by a truncated Fourier expansion P . The approximation error decrease exponentially with the degree of expansion. - angle computational error is introduced during the determination of the angle sequence in QSP circuits. The angle computation error is independent of the circuit depth, and can be reduced to the level of machine precision based on existing techniques [ 46 , 64 , 20 ] . - dephasing error is a type of hardware error specific to ion-trap devices. As the time increases, it becomes increasingly hard for devices to maintain the coherence of the qubit system, leading to more pronounced dephasing errors. In this section, we analyze the relation between the degree of simulation (i.e., the QSP circuit depth), and polynomial approximation error and hardware error. Before the analysis, we define the simulation error and its practical approximation. Definition 3 (Simulation error of single-qubit QSP) Let f\mathrel{\mathop{\mathchar 58\relax}}[-\pi,\pi]\to[-1,1] be a square-integrable function and \hat{f}(x) be its approximation implemented by a QSP circuit on an ion-trap device. The simulation error is defined as the squared L^{2} -distance between f and \hat{f} within [-\pi,\pi] , {E_{\operatorname{QSP}}}\coloneqq\lVert f-\hat{f}\rVert^{2}=\int_{-\pi}^{\pi}\lvert f(x)-\hat{f}(x)\rvert^{2}\textrm{ d}x. (C.1) {E_{\operatorname{QSP}}} depends on the choice of f and the QSP circuit, and can be approximated by sampling an ordered set of distinct points X=\left\{x_{j}\right\}_{j=1}^{N} and computing the mean square error , {\operatorname{MSE}_{X}}=\frac{1}{N}\sum_{j=0}^{N-1}\lvert f(x_{j})-\hat{f}(x_{j})\rvert^{2}. (C.2) Note that as N\to\infty and x_{j+1}-x_{j}\approx 2\pi/N , ~\begin{aligned} {\operatorname{MSE}_{X}}&=\lim_{N\to\infty}\frac{1}{2\pi}\sum_{j=0}^{N-1}\lvert f(x_{j})-\hat{f}(x_{j})\rvert^{2}(x_{j+1}-x_{j})\\ &=\frac{1}{2\pi}{E_{\operatorname{QSP}}}\end{aligned}. (C.3) Therefore {E_{\operatorname{QSP}}} can be well approximated when X is closely uniformly sampled, in which case we denote {\operatorname{MSE}_{N}}={\operatorname{MSE}_{X}} for convenience. C.1 Simulation error of multi-qubit extension For any QPP circuit V(U) in Equation ( B.12 ), V(U)(|0_{\operatorname{aux}}\rangle\otimes I)=|0_{\operatorname{aux}}\rangle\otimes P(U)+|1_{\operatorname{aux}}\rangle\otimes Q^{*}(U). (C.4) To get the eigenphase transformation under a trigonometric polynomial F , one needs to construct V(U) to simulate \sqrt{\left(1+F(x)\right)/2} , so that \operatorname{Tr}_{{\operatorname{aux}}}\left[Z_{\operatorname{aux}}\cdot V(U)\left(|0_{\operatorname{aux}}\rangle\langle 0_{\operatorname{aux}}|\otimes I\right)V(U)^{\dagger}\right]=F(U). (C.5) Similarly, one can define the simulation error of the multi-qubit extension. Definition 4 (Simulation error of multi-qubit QSP) Let f\mathrel{\mathop{\mathchar 58\relax}}[-\pi,\pi]\to[-1,1] be a square-integrable function and \hat{f}(x) be its approximation implemented by a QSP circuit on an ion-trap device. Then the simulation error of the multi-qubit extension of this QSP circuit is defined as the maximum performance discrepancy after applying to a quantum state, ~{E_{\operatorname{QSP-EXT}}}=\max_{U}\left\{\langle\psi|\left(f(U)-\hat{f}(U)\right)\left(f(U)-\hat{f}(U)\right)^{\dagger}|\psi\rangle\mathrel{\mathop{\mathchar 58\relax}}\textrm{$|\psi\rangle$ is a quantum state}\right\}. (C.6) In Equation ( C.6 ), the error factors introduced by implementing U or its controlled version are not considered, since these factors are dependent on U and |\psi\rangle , and we only focus on the fundamental limitation of function simulation. In the following theorem, we show that the simulation error of the quantum eigenphase transformations under f (see Definition 2 ) is equivalent to the simulation error of single-qubit QSP circuits. Theorem 1 (Single-qubit QSP governs the error, formal) Let W(x) be a QSP circuit that approximates a square-integrable function f\mathrel{\mathop{\mathchar 58\relax}}[-\pi,\pi]\to[-1,1] . Denote V(U) as its multi-qubit extension that simulates the eigenphase transformation. Then the simulation error of the multi-qubit extension is bounded as \frac{1}{2\pi}{E_{\operatorname{QSP}}}\leq{E_{\operatorname{QSP-EXT}}}\leq{E_{\operatorname{QSP}}}. (C.7) Proof. Denote \hat{f} for any n -qubit unitary with spectral decomposition U=\sum_{j}e^{i\tau_{j}}|\chi_{j}\rangle\langle\chi_{j}| , \displaystyle\max_{|\psi\rangle}\langle\psi|\left(f(U)-\hat{f}(U)\right)\left(f(U)-\hat{f}(U)\right)^{\dagger}|\psi\rangle (C.8) \displaystyle= \displaystyle\max_{|\psi\rangle}\sum_{j}\lvert f(\tau_{j})-\hat{f}(\tau_{j})\rvert^{2}\cdot\lvert\langle\psi|\chi_{j}\rangle\rvert^{2} (C.9) \displaystyle= \displaystyle\max_{j}\lvert f(\tau_{j})-\hat{f}(\tau_{j})\rvert^{2}\leq\max_{x\in[-\pi,\pi]}\lvert f(x)-\hat{f}(x)\rvert^{2} (C.10) \displaystyle= \displaystyle\,\,\lVert f-\hat{f}\rVert_{\infty}^{2}\leq\lVert f-\hat{f}\rVert^{2}={E_{\operatorname{QSP}}}. (C.11) Since U is arbitrary, we have {E_{\operatorname{QSP-EXT}}}\leq{E_{\operatorname{QSP}}} . For the first inequality, let x^{\prime}=\underset{x}{\mathrm{argmax}}\lvert f(x)-\hat{f}(x)\rvert and choose unitary U^{\prime}=e^{ix}I so that \displaystyle\max_{|\psi\rangle}\langle\psi|\left(f(U^{\prime})-\hat{f}(U^{\prime})\right)\left(f(U^{\prime})-\hat{f}(U^{\prime})\right)^{\dagger}|\psi\rangle (C.12) \displaystyle= \displaystyle\,\,\lvert f(x^{\prime})-\hat{f}(x^{\prime})\rvert^{2}=\lVert f-\hat{f}\rVert_{\infty}^{2} (C.13) \displaystyle\geq \displaystyle\,\,\frac{1}{2\pi}\lVert f-\hat{f}\rVert^{2}=\frac{1}{2\pi}{E_{\operatorname{QSP}}}. (C.14) By definition {E_{\operatorname{QSP-EXT}}}\geq\frac{1}{2\pi}{E_{\operatorname{QSP}}} . \sqcap \sqcup Theorem 1 and Equation ( C.3 ) together suggest that the lower bound of the simulation error for a QSP multi-qubit extension can be estimated by experimentally computing the mean square error of its single-qubit version. Corollary 6 Let V(U) be the multi-qubit extension of a QSP circuit. Denote {\operatorname{MSE}_{N}} as the mean square error of the QSP circuit obtained by closely uniformly sampling N points in the interval [-\pi,\pi] . Then \lim_{N\to\infty}{\operatorname{MSE}_{N}}\leq{E_{\operatorname{QSP-EXT}}}. (C.15) Theorem 1 is also applicable to other QSP conventions. Specifically, the singular value transformation of normal matrices is defined as ~f^{\textrm{(SV)}}(A)=\sum_{j}f(\xi_{j})|\tilde{\psi}_{j}\rangle\langle\psi_{j}| (C.16) for singular value decomposition A=\sum_{j}\xi_{j}|\tilde{\psi}_{j}\rangle\langle\psi_{j}| . 1 1 1 The basis in Equation ( C.16 ) could be |\psi_{j}\rangle\langle\psi_{j}| , depending on the choice of f . By employing a similar proof to Theorem 1 and using the QSP conversion discussed earlier, QSP circuits that simulate Chebyshev polynomials can similarly bound the simulation error of their multi-qubit extensions, such as the framework of quantum singular value transformation [ 14 ] . In essence, the performance of the multi-qubit extension is fundamentally constrained by the efficacy of the single-qubit QSP circuit, even if one can implement U without introducing additional noise factors. Consequently, for our objective of investigating the experimental limitations of function simulation, it is sufficient to focus on single-qubit QSP circuits in our experiments. The rationale is clear: if the single-qubit QSP circuit does not demonstrate good performance, then neither does its multi-qubit extension. Therefore, the single-qubit implementation serves as a reliable benchmark for assessing the overall capabilities of implementing QSP-based algorithms. C.2 Hardware error In addition to the errors arising during the design of QSP circuits, executing these circuits on trapped-ion devices also results in errors due to the imperfections of the hardware, which are classified as hardware errors. In quantum simulations, our primary concerns are the errors arising from inaccuracies in experimental operations and decoherence effects. In our experiment, we achieve various degrees of quantum state rotation by controlling the duration of microwave pulses. When the quantum simulator’s control over the rotation angles lacks precision, simulation errors accumulate with increasing circuit depth, preventing the simulation accuracy from reaching the prediction by theoretical MSEs. We attribute such errors to the operational imperfection of the quantum simulator, which highlights the importance of analyzing the tolerance of QSP circuits to such errors. We define the operational error as \operatorname{Err}=1-\{\phi,\theta,x\}_{j^{\prime}}/\{\phi,\theta,x\}_{j} , where \{\phi,\theta,x\}_{j} represents the ideal parameter, and \{\phi,\theta,x\}_{j^{\prime}} denotes the experimental parameter. Figure 7a illustrates the variation of theoretical MSEs under different levels of control error. We find that even when the discrepancy between the actual and theoretical rotation angles as large as 0.1, the impact on the final simulation accuracy remains minimal. The fidelity of a single microwave \pi pulse in our experiment exceeds 0.999, corresponding to Err < 0.001. Therefore, operational errors in the experiment have a negligible effect on the final simulation accuracy. (a) (b) Fig 7: Six panels presenting the MSEs for nine different QSP circuit depths. (a) The impact of operational error on the theoretical MSEs for the STEP function. The three panels illustrate the variation in MSEs when the operational error is set to 0.05, 0.1 and 0.15 respectively. (b) The impact of dephasing on the theoretical MSEs for the STEP function. The three panels illustrate the variation in MSEs when the dephasing rates are set to 0.5D , D and 2D respectively. To analyze the impact of decoherence on simulation accuracy, we mofidy the single qubit rotation gates R_{y}(\theta_{j}),R_{z}(\phi_{j}),R_{z}(x) in the QSP circuit. Additionally, to study the changes in coherence during the execution of the QSP circuit, we employ the master equation to observe the evolution of the quantum system. We define the states |0\rangle=|g\rangle=\begin{pmatrix}0\\ 1\end{pmatrix} and |1\rangle=|e\rangle=\begin{pmatrix}1\\ 0\end{pmatrix} , with the system initially prepared in the state |g\rangle , the density matrix at the initial moment is \rho_{0}=|g\rangle\langle g| . During the evolution, we introduce a decoherence term, \frac{D}{2}\left(2|e\rangle\langle e|\rho|e\rangle\langle e|-|e\rangle\langle e|\rho-\rho|e\rangle\langle e|\right) , into Eq. ( 1 ) to modify W(x) . The decoherence rate D\approx 2.25\times 10^{-4}\Omega can be obtained from the experimentally measured Ramsey fringes, where the microwave Rabi strength \Omega\approx 2\pi\times 35\ \mathrm{kHz} . Figure 7b shows the MSEs of the STEP function calculated at different decoherence rates. We define the coherence of the system as the sum of the magnitudes of the off-diagonal elements of the density matrix. However, after executing the j -th QSP circuits, the system is not necessarily in a maximally superposed state. In our numerical simulations, we allow the system to evolve freely for one Rabi period after the j -th circuit. When the off-diagonal elements reach their maximum during this period, we regard the coherence of this quantum system as C_{j}(\rho)=\sum_{m\neq n}\left|\rho_{m,n}\right| . As shown in Figure 8 , we have calculated the variation in coherence for Layer=360 of the STEP function as the system evolves. We find that the dephasing occurs more slowly during the execution of the QSP circuit than during the free evolution of the system in a noisy environment. This slower decoherence heps ensure the simulation results remain robust, even when the circuit duration exceeds the system’s coherence time. Fig 8: Coherence evolution for Layer=360 of the STEP function. The red and blue curves depict the coherence changes under the operation of the QSP circuits and without any operation, respectively. The horizontal axis j represents the number of applied sets of \{\phi,\theta,x\} , and the uppermost axis indicates the duration to reach the j -th circuit, and the vertical axis indicates the coherence magnitude. Each curve consists of 360 data points. C.3 Dephasing error for a deep QSP circuit In Figure 7b , why would the dephasing error exponentially deteriorate the simulation precision as the layer depth decreases? One can consider a greatly simplified theoretical model of simulating a QSP circuit, by making the following assumption: (1) n is a large number and the first n layers of the QSP circuit is noise-less. At this stage, the state passing the first n layers can be expressed as \rho_{n}=\begin{bmatrix}\lvert P_{n}\rvert^{2}&-P_{n}Q_{n}^{*}\\ -P_{n}^{*}Q_{n}&\lvert Q_{n}\rvert^{2}\end{bmatrix}, (C.17) where P_{n},Q_{n} are Laurent polynomials represented by the QSP circuit with first L layers. The hardware noise occurs right after the n -th layer of the QSP circuit. Further, this noise is described by a completely dephasing noise channel {\cal D} , i.e., all off-diagonal entries would be removed. The state passing the first (n+1) layers is \displaystyle\rho_{n+1}(\theta,\phi) (C.18) \displaystyle={\cal D}\left(A(\theta,\phi)\cdot{\cal D}(\rho_{n})\cdot A(\theta,\phi)^{\dagger}\right) \displaystyle={\cal D}\left(R_{y}(\theta)R_{z}(\phi)\begin{bmatrix}\lvert P_{n}\rvert^{2}&0\\ 0&\lvert Q_{n}\rvert^{2}\end{bmatrix}R_{z}^{\dagger}(\phi)R_{y}^{\dagger}(\theta)\right) \displaystyle=\left[\cos^{2}(\theta/2)\lvert P_{n}\rvert^{2}+\sin^{2}(\theta/2)\lvert Q_{n}\rvert^{2}\right]|0\rangle\langle 0|+ \displaystyle\left[\sin^{2}(\theta/2)\lvert P_{n}\rvert^{2}+\cos^{2}(\theta/2)\lvert Q_{n}\rvert^{2}\right]|1\rangle\langle 1|. Since n is large, the (n+1) -th term of the Fourier expansion of the target polynomial is small and so are \theta and \phi . Therefore, \rho_{n+1}(\theta,\phi) evolves towards the completely mixed state and hence deteriorates the simulation result. Further, since the effect is cumulative, the rate of such evolution increases exponentially as the layer increases. C.4 Application: quantum phase estimation We demonstrate how a single-qubit QSP experiment can guide the development of QSP-based algorithms to address practical problems. As an example, we examine the problem of quantum phase estimation (QPE). In this task, given a unitary operator U and an eigenstate |\chi\rangle , the goal is to estimate its eigenphase \tau\in[0,2\pi) such that U|\chi\rangle=e^{i\tau}|\chi\rangle . The QPE approach, as discussed in [ 20 , 15 ] , employs a binary search strategy. By simulating the STEP function on the unitary operator, one can measure the ancilla qubit in the extended QSP setup to recursively classify the eigenphases, leading to the following result. Theorem 7 (Theorem 8 in [ 20 ] ) Given a unitary U and an eigenstate |\chi\rangle of U with eigenvalue e^{i\tau} , there exists a QSP-based algorithm that executes {\cal O}(\frac{1}{\delta}L_{\varepsilon,\delta}) queries to controlled- U and its inverse to obtain an estimation of \tau up to \delta precision with probability at least 1-\varepsilon . Here L_{\varepsilon,\delta}={\cal O}\left(\log(\frac{1}{\varepsilon}\log\frac{1}{\delta})\right) is the number of QSP layers. The proof of Theorem 7 intrinsically incorporates the idea of Theorem 1 , as detailed in Appendix C of Ref. [ 20 ] . For a predetermined precision \delta , the error probability \varepsilon of the QSP-based algorithm exhibits exponential decay as a function of increasing QSP circuit depth. This relationship can be mathematically expressed as \varepsilon=c_{1}e^{-c_{2}L_{\varepsilon,\delta}} , where c_{1} and c_{2} are constants contingent upon the input data and quantum state. However, practical determination of an experimentally optimal L to achieve a desired error rate presents a non-trivial problem, given that the input state may exist as an unknown superposition of quantum states. To address this, our numerical simulations focusing on the STEP function can give the approximate trade-off between \varepsilon and L . As shown in Table 1 , to achieve an error rate below 10^{-3} , L should be around 180; conversely, reducing L to 30 would greatly reduce the depth of this algorithm, but make the success probability fall below 0.99. Table 1: Detailed MSEs of simulating STEP function with respect to different depths of deep QSP circuits. # of Layers 30 120 240 360 experimental MSE 2.8\times 10^{-2} 2.5\times 10^{-3} 1.9\times 10^{-3} 5.5\times 10^{-3} Note that this trade-off is independent of the input unitary operator, the specific quantum state, or the system’s dimension. Moreover, this trade-off is realized within a single qubit. Our experiments can provide a computationally efficient and resource-conservative methodology for guiding the experimental realization of QSP-based algorithms for solving the QPE problem. Fig 9: (a) The level scheme and hyperfine splitting of the lowest energy levels of the {}^{43}\textrm{Ca}^{+} ion. Two lasers at 397 nm are used for Doppler cooling and detection. Additionally, lasers at 854 nm and 866 nm serve to repump from the D states to the P states. The ultra stable laser at 729 nm is used for sideband cooling and optical shelving. (b) The ground level hyperfine structure in an external magnetic field. Microwave at 3.2 GHz is used for the ground state transition. The qubit is encoded to Stretch transition. Appendix D Experiment details D.1 Setup and laser cooling Our experiment employs a linear Paul trap. The four blade electrodes carry the rf potential for radial confinement and the end-cap electrodes with dc voltage provide confinement in the axial direction. The trap is driven at \Omega_{rf}/2\pi=23.9 MHz with the power of 3.5 W. The trap axial frequency is \omega_{z}/2\pi=1.2 MHz with a voltage of 600 V applied to the end-cap electrodes. A magnetostatic field of 8.2 G, generated by a pair of permanent magnets, defines a quantization axis and splits the energy levels of the ground state 4S_{1/2} , the metastable state 3D_{5/2} , and the excited state 4P_{1/2} into 16, 48 and 16 hyperfine energy levels respectively. The laser and microwave scheme can be found in Fig. 10 , where an ultra-stable narrow linewidth optical fiber laser for 729 nm transitions and the 3.2 GHz microwave are critical for the implementation of the experiment. The 729 nm fiber laser is locked to a high-finesse cavity made of ultra-low expansion material. A typical linewidth (FWHM) of 10 Hz is measured from the heterodyne beat note with respect to another laser system. The long-term drift of the 729 nm laser is measured to be 0.04 Hz/s by observing transitions in the ion. The microwave is directed and amplified by a horn antenna. We manipulate the qubit by controlling the frequency, amplitude, and phase of microwave by the direct digital synthesizer (DDS) and field programable gate array (FPGA) as shown in section IV. For Doppler cooling and fluorescence detection, the ion is excited on the 4S_{1/2}\leftrightarrow 4P_{1/2} dipole transition by two 397 nm lasers with a frequency difference of approximately 3.2 GHz. To avoid optical pumping into the 3D_{3/2} manifold, the 866 nm repumping laser has to be applied. We enhance the repumping efficiency by finely tuning the laser to the |3D_{3/2},F=3\rangle\leftrightarrow|4P_{1/2},F=3\rangle transition frequency and red-shifting a portion of the light using two acousto-optical modulators operating at frequencies of 145 MHz and 235 MHz. In this manner, all hyperfine 3D_{3/2} levels are resonantly coupled to one of the |4P_{1/2},F=3,4\rangle levels. We employ two 397 nm right-handed circularly polarized lasers to prepare the initial state |4S_{1/2},F=4,m_{f}=4\rangle . Subsequently, we employ 729 nm laser to shelve the population of |4S_{1/2},F=4,m_{F}=4\rangle to |3D_{5/2},F=6,m_{F}=6\rangle by a \pi pulse. Then we can use this quadrupole transition for quantum state detection by electron shelving method. High-fidelity qubit operations require the ion to be cooled within the Lamb-Dicke regime and close to the motional ground state. This is achieved by applying sideband cooling on the narrow |4S_{1/2},F=4,m_{F}=4\rangle to |3D_{5/2},F=6,m_{F}=6\rangle transition. Since the meta-stable D_{5/2} level is long lived, it needs to be quenched by the 854 nm repumping laser. For optimal performance, the repumping laser intensity has to be modified as the ion is cooled to the ground vibrational state. D.2 Experimental pulse sequences Microwave frequency sources are based on the frequency mixing of the commercial signal generator and DDS. The use of the DDS allows for phase and frequency control during a single experimental sequence. R_{y}(\theta_{j}),R_{z}(\phi_{j}),R_{z}(x) denote rotations of the quantum state around different axes of the Bloch sphere by varying angles. optimized parameters \theta_{j},\phi_{j} are converted into microwave pulse sequences with different pulse time and phases. In Fig. 10 (a), a microwave pulse sequence is generated with an initial phase of \frac{\pi}{2} and duration of t_{\theta_{j}} is generated to implement R_{y}(\theta_{j}) , where R_{y}(\theta_{j}) signifies the evolution of the quantum state around y axis of the Bloch sphere for the angle of \theta_{j} , R_{z}(\phi_{j}) is the evolution of quantum state along z axis of the Bloch sphere with the angle of \phi_{j} . The operations can be achieved by controlling FPGA to output three microwave pulses. The first pulse, with initial phase of \pi/2 and duration of T/2 ( T is the duration of the \pi pulse), rotates the quantum state in the equatorial plane of the Bloch sphere. The second pulse, with initial phase of 0 and duration of t_{\phi_{j}} , induces an evolution around z axis of the Bloch sphere with the angle of \phi_{j} , where t_{\phi_{j}}=\phi_{j}T/\pi . The third pulse is similar to the first one, rotating the quantum state back from the equatorial plane to its original axis. Both R_{z}(x) and R_{z}(\phi_{j}) involve similar operations. Fig 10: Experimental pulse sequences and experimental scheme for QSP. (a) is the schematic diagram of microwave pulse sequences for implementing R_{y}(\theta_{j}),R_{z}(\phi_{j}) and R_{z}(x) rotations. \pi/2 in the light colored box represents the microwave \pi/2 pulse. t_{\phi_{j}},t_{\theta_{j}} and t_{x} in the dark box denote the duration of the R_{z}(\phi_{j}),R_{y}(\theta_{j}) and R_{z}(x) rotations, respectively. (b) is the schematic diagram of implementing the QSP circuit. When the loop count j is less than L, experimental control system converts the optimized parameters \phi_{j},\theta_{j} into microwave pulse sequences. When the loop count j exceeds L, the QSP circuit stops working. Experimentally, for simulation layers L , the control system continuously outputs microwave pulses to obtain function value W(x) in the trapped-ion system, following the quantum circuit given in Eq. ( 1 ). Increasing L by one necessitates seven additional microwave pulses. Therefore, it can be simplified by adding a loop to enable the control system to automatically output microwave pulses. As shown in Fig. 10 (b), we prepare the initial state of {}^{43}\textrm{Ca}^{+} ion in |0\rangle . Subsequently, the control system determines whether the loop count is greater than L . If not, it converts the optimized parameters \theta_{j},\phi_{j} and the independent variable x into the R_{y}(\theta_{j}),R_{z}(\phi_{j}) and R_{z}(x) rotations, respectively. Otherwise, the loop terminates and we make measurements of the states of the ion. D.3 Measurement of coherence To measure the coherence time of the qubit, a Ramsey experiment is performed on the stretched state transition, as shown in Fig. 11 (a). The phase of the first \pi/2 pulse is set to 0, and then the phase \varphi of the second \pi/2 pulse is scanned after a delay time. For a fixed delay time \tau , the population of |1\rangle oscillates as the \pi/2 pulse changes. The fringe contrast is C=(P_{max}-P_{min})/(P_{max}+P_{min}) , where P_{max} and P_{min} are, respectively, the maximum and minimum values of the population in this oscillation. When the fringe contrast reaches its maximum value ( C=1 with P_{max}=1 and P_{min}=0 ), it indicates the maximum coherence. When the fringe contrast reaches its minimum value ( C=0 with P_{max}=0.5 and P_{min}=0.5 ), it indicates no coherence. Fig 11: Ramsey phase experiment on the stretched state transition. Between the two \pi/2 pulses, the delay time \tau and QSP circuits are inserted in (a) and (b), respectively. At each value of the Ramsey free precession time \tau , the phase of the second \pi/2 pulse is varied to produce a set of Ramsey fringes. (c) Fringe contrast of (a) and (b), where the black points represent the fringe contrast obtained by inserting different delay time \tau in (a), with \tau=0,2.5,4.7,9.4,14,19,28,38,47,52,57 ms, respectively. The red points represent the fringe contrast obtained by inserting QSP circuits with different layers of the STEP function in (b), with layers to be 0,15,30,60,90,120,180,240,300,330,360 , respectively. The blue horizontal line represents the case where the fringe contrast equals to 1/e . The blue star indicate the coherence time of 16.5 ms measured by (a). In Fig. 11 (b), by substituting the delay time with QSP circuits of different layers, we can assess the impact of QSP on coherence. To analyze the impact of QSP circuits on coherence, we set the delay time to be equivalent to the duration of the microwave pulse sequences for different layers. In Fig. 11 (c), we find that the coherence of the system is significantly improved after the QSP circuit is executed. We conjecture that the component pulses in QSP partially act as a spin echo, so that the simulation accuracy remains high even when the duration of the QSP circuits far exceeds the coherence time of the system.