"where we took into account that $\\left\\langle 0^{\\otimes n} \\right| H^{\\otimes n} = \\sum_{y} \\left\\langle y \\right|$ and $\\langle y|x \\rangle = \\delta_{x,y}$, $\\delta_{x=y} = 1$ and $\\delta_{x \\ne y} = 0$, because of the orthonormality of the states. If we have a constant function ($f(x) = 1$ for all $x$ or $f(x) = 0$ for all $x$) then the probability of measuring $\\left| 0^{\\otimes n} \\right\\rangle$ will be equal to $1$ (we should take the square of the module of the inner product in order to obtain the probability). So, if the function is constant then Alice always will measure $\\left| 0^{\\otimes n} \\right\\rangle$. Otherwise, if Bob's chosen function is balanced then half of the $(-1)^{f(x)}$ terms in the sum will be equal to $-1$, and the other half will be equal to $+1$, because of the definition of the balanced function. So, $\\frac{1}{2^n}\\sum_{x} (-1)^{f(x)} \\left\\langle x \\right| \\left| x \\right\\rangle = 0$ for a balanced function, thus Alice will have $0$ probability of measuring $\\left| 0^{\\otimes n} \\right\\rangle$. Therefore, if Alice measures $\\left| 0^{\\otimes n} \\right\\rangle$ it is an indicator that the function was constant, otherwise, if she doesn't measure $\\left| 0^{\\otimes n} \\right\\rangle$ then Bob's function was balanced.\n",
0 commit comments