# Probabilities does not sum up to 1 in simple circuit

I have an issue, perhaps with normalization with the following state. For $$\alpha^2 + \beta^2 =1$$, the probabilities in this state does not sum up to 1.

$$|\psi\rangle := \frac{1}{2}\left[\alpha\left(|0\rangle(|x\rangle+|x'\rangle\right) + \beta \left(|1\rangle(|x\rangle-|x'\rangle \right)\right]$$

as $$p(0)=\frac{2\alpha^2+2\alpha^2\langle x|x'\rangle}{4}=\alpha^2(\frac{1+\langle x|x'\rangle}{2})$$ and $$p(1)=\frac{2\beta^2 - 2\beta^2\langle x | x'\rangle}{4} = \beta^2\frac{1-\langle x | x'\rangle}{2}$$.

And $$p(0)+p(1) = \frac{\alpha^2 + \beta^2 + \alpha^2\langle x| x'\rangle- \beta^2\langle x | x'\rangle }{2} = \frac{1 + (\alpha^2 - \beta^2) \langle x | x'\rangle}{2}$$

Long version:

I created the state as follows:

• $$|0\rangle |0\rangle$$
• Hadamard on first qubit $$\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)|0\rangle$$
• Controlled operations: if 0 on first register I create state $$|x\rangle$$ otherwise I create state $$|x'\rangle$$ on second qubit. $$\frac{1}{\sqrt{2}}(|0\rangle|x\rangle+|1\rangle|x'\rangle)$$

• Now a perform a second Hadamard gate and re-group the terms:

$$\frac{1}{2}\left[\left(|0\rangle(|x\rangle+|x'\rangle\right) + \left(|1\rangle(|x\rangle-|x'\rangle \right)\right]$$

• Now I am ready to do a rotation on the $$Y$$-axis of $$\alpha$$ on the first qubit. This leads to: $$\frac{1}{2}\left[\alpha\left(|0\rangle(|x\rangle+|x'\rangle\right) + \beta \left(|1\rangle(|x\rangle-|x'\rangle \right)\right]$$

Perhaps I am doing something wrong with the normalization? But I don't need any normalization factor as $$\alpha^2+\beta^2=1$$

Thank you.

• The problem is at the step where you claim to do a $y$ rotation. All you've done is added extra coefficients, which is clearly not going to maintain normalisation. You need to actually calculate the effect of the $Y$ rotation (which will not keep the state of the second qubit as nicely as you're obviously hoping). – DaftWullie Apr 24 '20 at 10:32

Now I perform a second Hadamard gate and re-group the terms: $$\frac{1}{2}\left[\left(|0\rangle(|x\rangle+|x'\rangle\right) + \left(|1\rangle(|x\rangle-|x'\rangle \right)\right]$$ Now I am ready to do a rotation on the $$Y$$-axis of $$\alpha$$ (i.e. $$\tiny\pmatrix{\cos(\alpha)&-\sin(\alpha)\\\sin(\alpha)&\cos(\alpha)}$$) on the first qubit. This leads to:
$$\frac{1}{2}\left[\left((\cos(\alpha)\ket0 +\sin(\alpha)\ket1)(|x\rangle+|x'\rangle\right) + \left((-\sin(\alpha)\ket0+\cos(\alpha)\ket1)(|x\rangle-|x'\rangle \right)\right]$$