{ "id": "1402.0660", "version": "v4", "published": "2014-02-04T08:55:07.000Z", "updated": "2017-03-06T22:22:08.000Z", "title": "New Quantum Algorithm for Linear Regression", "authors": [ "Guoming Wang" ], "comment": "19 pages, no figure; v4: this paper has been significantly revised, new techniques are used, the results are improved and expanded", "categories": [ "quant-ph", "cs.DS" ], "abstract": "We present a quantum algorithm for fitting a linear regression model to a given data set using the least squares approach. Different from previous algorithms which only yield a quantum state encoding the optimal parameters, our algorithm outputs these numbers in the classical form. So by running it once, one completely determines the fitted model and then can use it to make predictions on new data at negligible cost. Moreover, our algorithm does not require the design matrix to be sparse or need any help from additional state preparation procedures. It runs in time $\\operatorname{poly}(\\operatorname{log}(N), d, \\kappa, 1/\\epsilon)$, where $N$ is the size of the data set, $d$ is the number of adjustable parameters, $\\kappa$ is the condition number of the design matrix, and $\\epsilon$ is the desired precision in the output. We also show that the polynomial dependence on $d$ and $\\kappa$ is necessary. Thus, our algorithm cannot be significantly improved. Furthermore, we also give a quantum algorithm that estimates the quality of the least-squares fit without computing its parameters explicitly. This algorithm runs faster than the one for finding this fit, and can be used to check whether the given data set qualifies for linear regression in the first place.", "revisions": [ { "version": "v3", "updated": "2014-04-02T04:56:36.000Z", "title": "Quantum Algorithms for Curve Fitting", "abstract": "We present quantum algorithms for estimating the best-fit parameters and the quality of least-square curve fitting. The running times of these algorithms are polynomial in $\\log{n}$, $d$, $\\kappa$, $\\nu$, $\\chi$, $1/\\Phi$ and $1/\\epsilon$, where $n$ is the number of data points to be fitted, $d$ is the dimension of feature vectors, $\\kappa$ is the condition number of the design matrix, $\\nu$ and $\\chi$ are some parameters reflecting the variances of the design matrix and response vector, $\\Phi$ is the fit quality, and $\\epsilon$ is the tolerable error. Different from previous quantum algorithms for these tasks, our algorithms do not require the design matrix to be sparse, and they do completely determine the fitted curve. They are developed by combining phase estimation and the density matrix exponentiation technique for dense Hamiltonian simulation.", "comment": "22 pages", "journal": null, "doi": null }, { "version": "v4", "updated": "2017-03-06T22:22:08.000Z" } ], "analyses": { "keywords": [ "quantum algorithms", "curve fitting", "design matrix", "density matrix exponentiation technique", "dense hamiltonian simulation" ], "note": { "typesetting": "TeX", "pages": 19, "language": "en", "license": "arXiv", "status": "editable", "adsabs": "2014arXiv1402.0660W" } } }