# How to measure in the bell basis?

The question is quite straightforward, I have some two qubit state and I want to measure it in the Bell basis. This question answers me partly, but I still have some doubts because, I thought that just reversing back the transformation would give me the desired mapping from:

$$|\Phi^+\rangle \to |00\rangle \\ |\Phi^-\rangle \to |01\rangle \\ |\Psi^+\rangle \to |10\rangle \\ |\Psi^+\rangle \to |11\rangle \\$$

but it does't seem to work as I thought it would:

By doing the math I understand that it should give this, but what I don't understand is my reasoning to why it is so. That is, why was I wrong thinking that the above circuit would return all the measurements in the $$|00\rangle$$?

I have found my mistake, and hopefully it may help more people. It lies on the fact that $$(AB)^\dagger=B^\dagger A^\dagger$$. Having done so, my result is as expected. But any more enlightening answer is more than welcome.

Generally, if you want to inverse a quantum algorithm you simply read it from other side and replace all quantum gates with their inverses, i.e. conjugate transposed operators.

So, if your original algorithm is described by series of gates $$A_{n}A_{n-1}\dots A_2A_1$$, the inverse algorithm is $$A_{1}^\dagger A_{2}^\dagger \dots A_{n-1} ^\dagger A_{n} ^\dagger$$.

In your case, you use an algorithm $$CNOT(H\otimes I)$$ for transforming initial state to Bell state. So, to measure in Bell basis you have to applied inverse $$(H^\dagger\otimes I^\dagger)CNOT^\dagger = (H\otimes I)CNOT$$ because $$I^\dagger=I$$, $$H^\dagger = H$$ and $$CNOT^\dagger = CNOT$$.

$$|\psi \rangle = c_{\Phi^+}|\Phi^+\rangle + c_{\Phi^-}|\Phi^-\rangle + c_{\Psi^+}|\Psi^+\rangle + c_{\Psi^-}|\Psi^-\rangle$$
where $$c_{\Phi^+}$$, $$c_{\Phi^-}$$, $$c_{\Psi^+}$$ and $$c_{\Psi^-}$$ are the corresponding aplitudes in the Bell basis. After applying $$(H\otimes I)CNOT$$ we will have:
$$|\psi \rangle = c_{\Phi^+}|00\rangle + c_{\Phi^-}|10\rangle + c_{\Psi^+}|01\rangle + c_{\Psi^-}|11\rangle$$
Note that $$c$$ coefficients that were in correspondence with Bell states now correspond to the computational states. So, this is letting us have the mapping from Bell states to computational states.