Full text
Multi-dimensional Fourier Series with Quantum Circuits Berta Casas∗, Alba Cervera-Lierta∗ ∗Barcelona Supercomputing Center, Barcelona, Spain E-mail: {berta.casas, alba.cervera}@bsc.es Keywords—Quantum machine learning, Function fitting, Fourier series I. EXTENDED ABSTRACT Quantum Machine Learning is the field that aims to integrate Machine Learning with quantum computation. Some works have proposed to implement supervised learning models in quantum computers with applications in problems such as function fitting or classification. Indeed, it has been shown that a single qubit (the quantum equivalent of a bit) can act as a universal approximant. In particular, function fitting models with a particular data encoding strategy output onedimensional Fourier series. However, models used for multidimensional function fitting have not been explored with the same level of detail. We study quantum strategies for fitting multi-dimensional functions with a general formalism for qudits (quantum information units of dimension d). Using different types of circuit ansatzes (a particular choice of the quantum circuit), we show that the outputs of the models are multi-dimensional Fourier series. We found that the degrees of freedom required for fitting such functions grow faster than the available degrees in the Hilbert space of the circuit. These results exhibit that, for these types of problems, the model does not have enough freedom to fit a general Fourier series. The goal of the work is to study the expressibility of these multivariate quantum models, in other words, the type of functions that can be generated. We contribute to the study of multi-feature quantum machine learning algorithms and conclude that new encoding strategies beyond Fourier series formalism can be more convenient. A. Introduction The development of computational paradigms such as quantum computation opens the path to explore the use of quantum devices to perform Machine Learning (ML) tasks, which raises the question of whether Quantum Machine Learning (QML) algorithms can offer an advantage compared to classical ones. We study a supervised QML algorithm that pertains to the family of Variational Quantum Algorithms [1] (hybrid algorithms that have some parameters in the quantum circuit, which are optimized classically), depicted in Fig. 1. The quantum circuit follows the data re-uploading strategy [2], which consists of defining a structure called layer that encodes and processes the data with some trainable gates A(l)( θl). Data is repeatedly introduced into the quantum circuit (see Fig. 2). With this re-uploading strategy and with an encoding Fig. 1. Representation of a quantum supervised learning model implemented via a Variational Quantum Algorithm (VQA). The quantum part is composed of a quantum circuit with a given unitary Uthat depends on the data point x and the trainable parameters θ. The classical part consists of optimizing a cost function(in our case, tailored for the classification of a target function f(x) that measures the distance with the expectation value of some observable M) and optimize it with respect to the parameters via a classical subroutine. … Fig. 2. General structure of a data re-uploading procedure. The 0th layer is used to generate an initial superposition. The other layers contain an encoding gate S(x)and a processing gate A( θl), containing parameters which are optimized. gate S(x) = eixH , where His an arbitrary encoding Hamiltonian and xthe data encoded, the output of the model (the expectation value of an observable M) is a one-dimensional Fourier series [3]. The frequencies of the Fourier series are related to the eigenvalues of the encoding Hamiltonian Hand the coefficients are determined by the trainable gates A(l)( θl). B. Multi-dimensional quantum models In this section, we extend the one-dimensional quantum model to multi-dimensional, besides studying its expressivity. We propose two quantum circuit models, named the Line and Parallel ansatzes. They are depicted in Fig. 3. Both models generate multi-dimensional Fourier series as outputs: ⟨M(x)⟩= D X ω1,ω2,...,ωM=−D cωeix·ω (1) We study in which cases the models can generate general Fourier series. For this, we compare the degrees of freedom
… Fig. 3. Quantum circuit ansatzes of the models. The Line ansatz (a) encodes each data feature in a single qudit. Thus the circuit depth grows linearly with the total number of features M. The Parallel ansatz (b) encodes the Mfeatures in Mqudits instead. (d.o.f.) νof the output Fourier series of the models with the number of independent parameters Npon the quantum circuit. The d.o.f. are the real and imaginary part of all the independent coefficients cω. We study if the models have enough d.o.f. to fit a general Fourier series, meaning ν≥Np, which we name the d.o.f. condition. C. Results For a one-dimensional function the d.o.f. condition is always accomplished since Np> ν for this case. However, for data of higher dimension the d.o.f. grow faster than the number of parameters in the circuit. We show an example of this for two-dimensional data in Fig. 4 for the Line and Parallel ansatzes. We represent the d.o.f. condition in front of the Fourier series degree D=max(ω), which depend on the number of layers Land the dimension of the qudit d. We observe that the Line ansatz does not accomplish the d.o.f. condition and therefore, it does not have enough free parameters to fit a general Fourier series. On the other hand, the Parallel ansatz achieves the condition until a certain degree D, but the d.o.f. νgrow faster than the parameters available in the circuit. Besides this, by using higher information units (qutrits in this case, the quantum equivalent to a trit), we achieve to accomplish the condition up to higher-degree Fourier series. D. Conclusion Besides extending a well-known QML formalism to multidimensional datasets, this work aims to establish a trade-off between the number of qudits, circuit depth (measured with the number of layers of the circuit), data dimension, and local qudit dimension. The minimum number of parameters needed to characterize the multi-variable Fourier series grows exponentially with the data dimensions, resulting in poor scaling. Other methods, such as using non-commuting gates to embed the data features, should be explored, although some may depart from the Fourier series formalism. Besides this, 0 50 100 150 200 # parameters/coefficients qubit d = 2 Line Ansatz Np 0 100 200 300 400 500 Parallel Ansatz 2468 Degree D 50 100 150 200 250 300 # parameters/coefficients qutrit d = 3 2 4 6 8 10 12 Degree D 0 100 200 300 400 500 600 Fig. 4. Comparison of the degrees of freedom condition for the Line (first column) and Parallel (second column) ansatzes using qubits (first row) and qutrits (second row). The dashed line indicates the degrees of freedom νof the Fourier series generated by the model. The solid line shows the number of trainable parameters Npin the circuit. The Parallel Ansatz fulfils the degrees of freedom condition for higher-degree Fourier series compared to the Line Ansatz, being the gap wider when using qutrits. with the proposed multi-qudit models, we can approximate functions of a higher degree, which can be used as a suitable approximation for some problems. II. ACKNOWLEDGMENT This work has been financially supported by the Ministry of Economic Affairs and Digital Transformation of the Spanish Government through the QUANTUM ENIA project call – Quantum Spain project, and by the European Union through the Recovery, Transformation and Resilience Plan – NextGenerationEU within the framework of the Digital Spain 2026 Agenda. REFERENCES [1] M. Cerezo and et al., “Variational quantum algorithms,” Nature Reviews Physics, vol. 3, no. 9, pp. 625–644, Aug. 2021. [Online]. Available: https://doi.org/10.1038/s42254-021-00348-9 [2] A. P´ erez-Salinas and et al., “Data re-uploading for a universal quantum classifier,” Quantum, vol. 4, p. 226, Feb. 2020. [Online]. Available: https://doi.org/10.22331/q-2020-02-06-226 [3] M. Schuld and et al, “Effect of data encoding on the expressive power of variational quantum-machine-learning models,” Physical Review A, vol. 103, no. 3, Mar. 2021. [Online]. Available: https://doi.org/10.1103/physreva.103.032430 Berta Casas received hes BSc degree in Physics from Universitat de Barcelona (UB), in 2021. The following year, she completed her MSc degree in Quantum Science and Technologies from Universitat de Barcelona (UB), Universitat Autonoma de Barcelona (UAB) and Universitat Politecnica de Catalunya (UPC) in Barcelona. Since 2022, he has been with the Quantic group of Barcelona Supercomputing Center (BSC) as well as a PhD student at Universitat de Barcelona (UB), Spain.