The key intuition here is to analyse the performance of the algorithms when the worst-case data input is subject to noise, which is represented by a small Gaussian element-wise perturbation. Following the convention of Spielman and Teng (2009), we state the definition of smoothed complexity and then prove that preparing amplitude-encoded states has a constant smoothed complexity:
Definition 1 (Smoothed Complexity 2009)
Given an algorithm \(\mathcal {A}\) with an input domain \({\Omega }_{D}=\mathbb {R}^{D}\), the smoothed complexity of \(\mathcal {A}\) with σ-Gaussian perturbation is defined as
$$ \begin{array}{@{}rcl@{}} \text{Smoothed}^{\sigma}_{\mathcal{A}}(D)=\max_{\mathbf{x}\in [-1,1]^{D}} \mathbb{E}_{\mathbf{g}}[T_{\mathcal{A}}(\mathbf{x}+\mathbf{g})], \end{array} $$
(4)
where g is a Gaussian random vector with variance σ2, and \(T_{\mathcal {A}}\) denotes the runtime of \(\mathcal {A}\).
Furthermore, \(\mathcal {A}\) is said to have polynomial smoothed complexity if there exist positive constants k1, k2, D0, σ0 and c such that for all D ≥ D0 and 0 ≤ σ ≤ σ0, it holds that
$$ \begin{array}{@{}rcl@{}} \text{Smoothed}^{\sigma}_{\mathcal{A}}(D)\le c \sigma^{-k_{2}} D^{k_{1}}. \end{array} $$
(5)
Theorem 1
Given oracle access, Ox to the entries of \(\mathbf {x}\in \mathbb {R}^{D}\), the amplitude encoding of x into |x〉 has smoothed complexity \(\mathcal {O}(1/\sigma )\).
Proof
Let \(\mathcal {A}\) be the algorithm that maps \(D^{-\frac {1}{2}} {\sum }_{i} \vert i \rangle \vert x_{i} \rangle \) into \(\vert \mathbf {x} \rangle = \|\mathbf {x}\|_{2}^{-1}{\sum }_{i=1}^{D} x_{i} \vert i \rangle \). After applying the controlled rotation and uncomputing the second register, the optimal success probability of projecting the state,
$$ \begin{array}{@{}rcl@{}} D^{-\frac{1}{2}} \sum\limits_{i} \vert i \rangle\left( \sqrt{1-|x_{i}|^{2}} \vert 0 \rangle + x_{i} \vert 1 \rangle\right) \end{array} $$
(6)
onto the desired state |x〉 is given by \(P_{\mathcal {A}}=\mathcal {O}(\frac {\|\mathbf {x}\|_{2}}{\sqrt {D}})\) with fixed-point amplitude amplification (Gilyén et al. 2018). From the definition of smoothed complexity, Eq. 4, in the worst case, we have
$$ \begin{array}{@{}rcl@{}} \text{Smoothed}^{\sigma}_{\mathcal{A}}(D)=&\max_{\mathbf{x}\in [-1,1]^{D}} \mathbb{E}_{\mathbf{g}}[T_{\mathcal{A}}(\mathbf{x}+\mathbf{g})] \\ =& \left( \min_{\mathbf{x}\in [-1,1]^{D}} \mathbb{E}_{\mathbf{g}}[P_{\mathcal{A}}(\mathbf{x}+\mathbf{g})]\right)^{-1}, \end{array} $$
(7)
where the second line follows from the fact that the expected runtime is inversely proportional to the expected success probability. Note that since \(P_{\mathcal {A}}(\mathbf {x}+\mathbf {g}) = \mathcal {O}(\frac {\|\mathbf {x}+\mathbf {g}\|_{2}}{\sqrt {D}})\) and g is a zero-mean Gaussian random vector, the minimum of expected success probability is obtained at x = 0. We thus have
$$ \begin{array}{@{}rcl@{}} \text{Smoothed}^{\sigma}_{\mathcal{A}}(D)=&\left( \mathbb{E}_{\mathbf{g}}[P_{\mathcal{A}}(\mathbf{g})]\right)^{-1}\\ =& D^{\frac{1}{2}} \left( \mathbb{E}[\|\mathbf{g}\|_{2}]\right)^{-1}.\\ =& \mathcal{O}\left( \frac{1}{\sigma}\right), \end{array} $$
(8)
where the last equality followed by noting that the random variable, ∥g∥2, by definition follows a chi distribution with mean,
$$ \begin{array}{@{}rcl@{}} \mathbb{E}[\|\mathbf{g}\|_{2}] = \sqrt{2}\sigma\frac{\Gamma((D+1)/2)}{\Gamma(D/2)}=\mathcal{O}(\sigma\sqrt{D} ). \end{array} $$
(9)
□
The result of Eq. 8 implies that when the input vector is subjective to a certain level of noise represented by an element-wise Gaussian perturbation, the query complexity of preparing amplitude encoding is independent of the dimensionality.
We have seen that the quantum state preparation based on amplitude encoding has a constant runtime given that the input is subjective to a finite variance Gaussian noise. An analogous reasoning applies in the fully classical setting. Classically, particularly in the context of quantum-inspired ML algorithm, ℓ2-sampling can be achieved by simple rejection sampling: an entry is chosen uniformly at random, and a value xj is read (we assume xj ≤ c, and c is a known constant upper bound on the entries). Then a random real is sampled from the interval (0,c), and if this value is below |xj|2, the value j is output. Otherwise the process is repeated. As desired, the acceptance probability of the element j is given by \( P_{j}^{\text {accept}} = |x_{j}|^{2}, \) which leads to the following average runtime for producing an ℓ2-sample from the correct distribution:
$$ \begin{array}{@{}rcl@{}} \mathbb{E}[T_{\mathcal{R}}] = \left( \frac{1}{D}\sum\limits_{j} P_{j}^{\text{accept}}\right)^{-1} = D\left( \sum\limits_{j}|x|_{j}^{2}\right)^{-1}. \end{array} $$
(10)
We can make an analogous smoothed analysis for this classical rejection sampling process. Denoting \(\mathcal {R}\) as the algorithm that performs rejection sampling, we have
$$ \begin{array}{@{}rcl@{}} \text{Smoothed}^{\sigma}_{\mathcal{R}}(D)&=&\max_{\mathbf{x}\in [-1,1]^{D}} \mathbb{E}_{\mathbf{g}}[T_{\mathcal{R}}(\mathbf{x}+\mathbf{g})] \\ &=& D \left( \mathbb{E}[\|\mathbf{g}\|_{2}]\right)^{-2}.\\ &=& \mathcal{O}\left( \frac{1}{\sigma^{2}}\right). \end{array} $$
(11)
Thus the smoothed complexity of preparing quantum amplitude encoding from QRAM queries and classical ℓ2-samplings from classical RAM are \(\mathcal {O}(\frac {1}{\sigma })\) and \(\mathcal {O}(\frac {1}{\sigma ^{2}})\) respectively given a σ2-variance Gaussian perturbation on the input. The quadratic quantum improvement in the dependency on σ comes directly from amplitude amplification.