analysis centers on the complexity of the sampled states. Using the bipartite entanglement as quantifier, we will show that the cost of adding one more qubit of resolution decays exponentially. This will help us understand that there one quasi-local unitary procedure that builds the GR state with a cost that is polynomial in the number of qubits, $T_\text{GR}\sim \mathcal{O}(-m\log(\varepsilon)).$ We will confirm numerically this result using various well-known probability distributions.

Other discretizations {#sec:other-discretizations}
---------------------

The integral representation by Grover and Rudolph reproduces exactly the probability that is contained inside each interval, but it requires computing $2^m$ integrals. In practice, this is unnecessary because the estimation of expected values already introduces a discretization error  $\varepsilon_\text{sample}\sim \mathcal{O}(\delta_m)$ in the operator definition. It is not difficult to find simpler representations that have the same or better scaling. The obvious one is the uniform sampling of the probability distribution $$\label{eq:riemann}
  \ket{p_R^{(m)}} = \sqrt{\frac{\delta_m}{N_m}}\sum_s \sqrt{p(x_s)}\ket{s},\;\mbox{with}\; N_m = \sum_s \delta_mp(x_s).$$ The standard error bound for this Riemann-type state is $\varepsilon_\text{sample} \leq \max\left|\frac{d}{dx}(fp)\right| \delta_m,$ which depends on the derivatives of both the sampled observables and probability.

The first order scaling is good enough for the simulations that we will show below, because the interval size decreases exponentially 