Abstract The ability to efficiently load functions on quantum computers with high fidelity is essential for many quantum algorithms, including those for solving partial differential equations and Monte Carlo estimation. In this work, we introduce the Fourier series loader (FSL) method for preparing quantum states that exactly encode multi-dimensional Fourier series using linear-depth quantum circuits. Specifically, the FSL method prepares a (Dn)-qubit state encoding the 2 Dn -point uniform discretization of a D-dimensional function specified by a D-dimensional Fourier series. A free parameter, m, which must be less than n, determines the number of Fourier coefficients, 2 D ( m + 1 ) , used to represent the function. The FSL method uses a quantum circuit of depth at most 2 ( n − 2 ) + ⌈ log 2 ( n − m ) ⌉ + 2 D ( m + 1 ) + 2 − 2 D ( m + 1 ) , which is linear in the number of Fourier coefficients, and linear in the number of qubits (Dn) despite the fact that the loaded function’s discretization is over exponentially many (2 Dn ) points. The FSL circuit consists of at most D n + 2 D ( m + 1 ) + 1 − 1 single-qubit and D n ( n + 1 ) / 2 + 2 D ( m + 1 ) + 1 − 3 D ( m + 1 ) − 2 two-qubit gates; we present a classical compilation algorithm with runtime O ( 2 3 D ( m + 1 ) ) to determine the FSL circuit for a given Fourier series. The FSL method allows for the highly accurate loading of complex-valued functions that are well-approximated by a Fourier series with finitely many terms. We report results from noiseless quantum circuit simulations, illustrating the capability of the FSL method to load various continuous 1D functions, and a discontinuous 1D function, on 20 qubits with infidelities of less than 10−6 and 10−3, respectively. We also demonstrate the practicality of the FSL method for near-term quantum computers by presenting experiments performed on the Quantinuum H1-1 and H1-2 trapped-ion quantum computers: we loaded a complex-valued function on 3 qubits with a fidelity of over 95 % , as well as various 1D real-valued functions on up
Abstract The ability to efficiently load functions on quantum computers with high fidelity is essential for many quantum algorithms, including those for solving partial differential equations and Monte Carlo estimation. In this work, we introduce the Fourier series loader (FSL) method for preparing quantum states that exactly encode multi-dimensional Fourier series using linear-depth quantum circuits. Specifically, the FSL method prepares a (Dn)-qubit state encoding the 2 Dn -point uniform discretization of a D-dimensional function specified by a D-dimensional Fourier series. A free parameter, m, which must be less than n, determines the number of Fourier coefficients, 2 D ( m + 1 ) , used to represent the function. The FSL method uses a quantum circuit of depth at most 2 ( n − 2 ) + ⌈ log 2 ( n − m ) ⌉ + 2 D ( m + 1 ) + 2 − 2 D ( m + 1 ) , which is linear in the number of Fourier coefficients, and linear in the number of qubits (Dn) despite the fact that the loaded function’s discretization is over exponentially many (2 Dn ) points. The FSL circuit consists of at most D n + 2 D ( m + 1 ) + 1 − 1 single-qubit and D n ( n + 1 ) / 2 + 2 D ( m + 1 ) + 1 − 3 D ( m + 1 ) − 2 two-qubit gates; we present a classical compilation algorithm with runtime O ( 2 3 D ( m + 1 ) ) to determine the FSL circuit for a given Fourier series. The FSL method allows for the highly accurate loading of complex-valued functions that are well-approximated by a Fourier series with finitely many terms. We report results from noiseless quantum circuit simulations, illustrating the capability of the FSL method to load various continuous 1D functions, and a discontinuous 1D function, on 20 qubits with infidelities of less than 10−6 and 10−3, respectively. We also demonstrate the practicality of the FSL method for near-term quantum computers by presenting experiments performed on the Quantinuum H1-1 and H1-2 trapped-ion quantum computers: we loaded a complex-valued function on 3 qubits with a fidelity of over 95 % , as well as various 1D real-valued functions on up
Efficiently uploading data into quantum states is essential for many quantum algorithms to achieve advantage across various applications. In this paper, we address this challenge by developing a method to upload a polynomial function f ( x ) on the interval x ∈ [ − 1 , 1 ] into a pure quantum state consisting of qubits, where a discretized f ( x ) is the amplitude of this state. The preparation cost has O ( n log n ) scaling in the number of qubits n and linear scaling with the degree of the polynomial Q . This efficiency allows the preparation of states whose amplitudes correspond to high-degree polynomials (up to 10 4 ), enabling accurate approximation of functions that admit efficient polynomial series representations and whose amplitude profiles are not extremely localized. We provide a fully explicit circuit realization, based on four real polynomials that meet specific parity and boundedness conditions. We extend this construction to cover piecewise polynomial functions, a case not previously addressed explicitly in the literature, the algorithm scaling linearly with the number of piecewise parts. Our method achieves efficient quantum circuit implementation and we present detailed gate counting and resource analysis.
Loading classical data into quantum computers represents an essential stage in many relevant quantum algorithms, especially in the field of quantum machine learning. Therefore, the inefficiency of this loading process means a major bottleneck for the application of these algorithms. Here, we introduce two approximate quantum-state preparation methods for the noisy intermediate-scale quantum era inspired by the Grover-Rudolph algorithm, which partially solve the problem of loading real functions. Indeed, by allowing for an infidelity $\ensuremath{\epsilon}$ and under certain smoothness conditions, we prove that the complexity of the implementation of the Grover-Rudolph algorithm without ancillary qubits, first introduced by M\"ott\"onen et al., results into $\mathcal{O}({2}^{{k}_{0}(\ensuremath{\epsilon})})$, with n the number of qubits and ${k}_{0}(\ensuremath{\epsilon})$ asymptotically independent of n. This leads to a dramatic reduction in the number of required two-qubit gates. Aroused by this result, we also propose a variational algorithm capable of loading functions beyond the aforementioned smoothness conditions. Our variational Ansatz is explicitly tailored to the landscape of the function, leading to a quasioptimized number of hyperparameters. This allows us to achieve high fidelity in the loaded state with high speed convergence for the studied examples.
Loading functions into quantum computers represents an essential step in several quantum algorithms, such as quantum partial differential equation solvers. Therefore, the inefficiency of this process leads to a major bottleneck for the application of these algorithms. Here, we present and compare two efficient methods for the amplitude encoding of real polynomial functions on n qubits. This case holds special relevance, as any continuous function on a closed interval can be uniformly approximated with arbitrary precision by a polynomial function. The first approach relies on the matrix product state representation (MPS). We study and benchmark the approximations of the target state when the bond dimension is assumed to be small. The second algorithm combines two subroutines. Initially we encode the linear function into the quantum registers either via its MPS or with a shallow sequence of multi-controlled gates that loads the linear function's Hadamard-Walsh series, and we explore how truncating the Hadamard-Walsh series of the linear function affects the final fidelity. Applying the inverse discrete Hadamard-Walsh transform converts the state encoding the series coefficients into an amplitude encoding of the linear function. Thus, we use this construction as a building block to achieve an exact block encoding of the amplitudes corresponding to the linear function on k0 qubits and apply the quantum singular value transformation that implements a polynomial transformation to the block encoding of the amplitudes. This unitary together with the Amplitude Amplification algorithm will enable us to prepare the quantum state that encodes the polynomial function on k0 qubits. Finally we pad n−k0 qubits to generate an approximated encoding of the polynomial on n qubits, analyzing the error depending on k0 . In this regard, our methodology proposes a method to improve the state-of-the-art complexity by introducing controllable errors.
In this work we develop a highly efficient representation of functions and differential operators based on Fourier analysis. Using this representation, we create a variational hybrid quantum algorithm to solve static, Schr\"odinger-type, Hamiltonian partial differential equations (PDEs), using space-efficient variational circuits, including the symmetries of the problem, and global and gradient-based optimizers. We use this algorithm to benchmark the performance of the representation techniques by means of the computation of the ground state in three PDEs, i.e., the one-dimensional quantum harmonic oscillator and the transmon and flux qubits, studying how they would perform in ideal and near-term quantum computers. With the Fourier methods developed here, we obtain low infidelities of order ${10}^{\ensuremath{-}4}--{10}^{\ensuremath{-}5}$ using only three to four qubits, demonstrating the high compression of information in a quantum computer. Practical fidelities are limited by the noise and the errors of the evaluation of the cost function in real computers, but they can also be improved through error mitigation techniques.
Unitary and non-unitary diagonal operators are fundamental building blocks in quantum algorithms with applications in the resolution of partial differential equations, Hamiltonian simulations, the loading of classical data on quantum computers (quantum state preparation), and many others. In this paper, we introduce a general approach to implement unitary and non-unitary diagonal operators with efficient-adjustable-depth quantum circuits. The depth, i.e., the number of layers of quantum gates of the quantum circuit, is reducible with respect either to the width, i.e., the number of ancilla qubits, or to the accuracy between the implemented operator and the target one. While exact methods have an optimal exponential scaling either in terms of size, i.e., the total number of primitive quantum gates, or width, approximate methods prove to be efficient for the class of diagonal operators depending on smooth, at least differentiable, functions. Our approach is general enough to allow any method for diagonal operators to become adjustable-depth or approximate, decreasing the depth of the circuit by increasing its width or its approximation level. This feature offers flexibility and can match with the hardware limitations in coherence time or cumulative gate error. We illustrate these methods by performing quantum state preparation and non-unitary-real-space simulation of the diffusion equation. This simulation paves the way to efficient implementations of stochastic models useful in physics, chemistry, biology, image processing, and finance.
Unitary and non-unitary diagonal operators are fundamental building blocks in quantum algorithms with applications in the resolution of partial differential equations, Hamiltonian simulations, the loading of classical data on quantum computers (quantum state preparation) and many others. In this paper, we introduce a general approach to implement unitary and non-unitary diagonal operators with efficient-adjustable-depth quantum circuits. The depth, i.e., the number of layers of quantum gates of the quantum circuit, is reducible with respect either to the width, i.e, the number of ancilla qubits, or to the accuracy between the implemented operator and the target one. While exact methods have an optimal exponential scaling either in terms of size, i.e., the total number of primitive quantum gates, or width, approximate methods prove to be efficient for the class of diagonal operators depending on smooth, at least differentiable, functions. Our approach is general enough to allow any method for diagonal operators to become adjustable-depth or approximate, decreasing the depth of the circuit by increasing its width or its approximation level. This feature offers flexibility and can match with the hardware limitations in coherence time or cumulative gate error. We illustrate these methods by performing quantum state preparation and non-unitary-real-space simulation of the diffusion equation. This simulation paves the way to efficient implementations of stochastic models useful in physics, chemistry, biology, image processing and finance.