While reading the paper "Compiling basic linear algebra subroutines for quantum computers", here, in the Appendix, the author/s have included a section on quantum inner product estimation.
Consider two vectors $x,y \in \mathbb{C}^n, x= (x_1, \dots , x_n), y= (y_1, \ldots, y_n)$, we want to estimate the inner product $\langle x | y \rangle$. Assume we are given a state $|\psi \rangle = \frac {1} {\sqrt 2} \big(|0 \rangle |x \rangle + |1 \rangle |y \rangle \big)$, after applying a Hadamard transform to the first qubit, the result is:
$$|\psi \rangle = \frac {1} {2} \big(|0 \rangle (|x \rangle + |y \rangle) + |1 \rangle(|x \rangle - |y \rangle) \big).$$
The author then states that after measuring the first qubit in the computational basis, the probability to measure $|0 \rangle$ is given by $p = \frac {1} {2} \big(1 + \mathrm{Re}(\langle x | y \rangle) \big)$. I do not understand this statement. From what I understand, after applying a partial measurement to the first qubit, the probability of measuring $|0 \rangle$ is given by $\frac {1} {4} \sqrt { \sum_{i=0}^{n}(\overline{(x_i+y_i)}(x_i+y_i)) }^2$ (in other words the norm of the vector squared), so I am not sure why these formulas are equivalent, or if I am mistaken.