# What is the "additive error" of Swap Test?

I'm learning the Swap Test, a quantum circuit to calculate the inner product of two quantum states $$|\langle \phi|\psi\rangle|^2$$: For the error analysis of this quantum circuit, according to Swap Test:

"This allows one to, for example, estimate the squared inner product between the two states, $$|\langle \phi|\psi\rangle|^2$$, to $$\epsilon$$ additive error by taking the average over $$O(\frac {1}{\varepsilon ^{2}})$$ runs of the swap test."

What's the "additive error $$\epsilon$$ " from a statistical point of view? Is it MSE, RMSE, or Variance? Can RMSE serve as an additive error of the Swap Test?

Additive error $$\epsilon$$ means that, if the true value of the expectation value we are attempting to measure is $$\langle \hat{O} \rangle_{\textrm{True}}$$, then our estimate $$\langle \hat{O} \rangle_{\textrm{Estimated}}$$ falls within the range $$\langle \hat{O} \rangle_{\textrm{Estimated}} \in [\langle \hat{O} \rangle_{\textrm{True}} - \epsilon, \langle \hat{O} \rangle_{\textrm{True}} + \epsilon]$$. Conversely, a multiplicative error $$\epsilon$$ implies $$\langle \hat{O} \rangle_{\textrm{Estimated}} \in [\langle \hat{O} \rangle_{\textrm{True}} (1 - \epsilon), \langle \hat{O} \rangle_{\textrm{True}} (1 + \epsilon)]$$. See, e.g., this Theoretical Computer Science question for a more in-depth discussion of the differences between the two.
• Yes, that is correct. The usual RMSE corresponds to the additive error. If you want to consider the estimation of the fidelity up to some multiplicative error, then you have to divide by the true fidelity. Essentially, the main difference between the additive and multiplicative errors arises when the fidelity is close to zero. In that case, achieving a multiplicative error $\epsilon$ takes more shots than achieving the same additive error $\epsilon$, because $\epsilon$ eventually becomes large compared to the true fidelity as it approaches zero. Jun 9 at 13:33