In measurement based quantum computing, according to R. Raussendorf, Hadamard Gate can be realized by five qubit cluster state, where the first qubit is measured in X basis and the following three are measured in Y basis.
However, even though I tried to calculate the outcome of the following measurements, I did not find Hadamard gate acting on initial state.
I assumed, to measure the qubit in X basis, we need to apply H gate and measure in Z basis:
\begin{equation} \mathbf{H} = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1\\ 1 & -1 \end{bmatrix} \end{equation}
for measurements in Y basis, we apply a U gate and measure in the z basis, the required U gate is as follows:
\begin{equation} \mathbf{U} =\frac{1}{\sqrt{2}} \begin{bmatrix} 1 & -i\\ 1 & i \end{bmatrix} \end{equation}
Now, measuring the state in those basis simply means applying those gates consecutively, except for additional X gates due to measurements, which we are not dealing right now. So, the result of this operation:
\begin{equation} \mathbf{X^{m_4}U X^{m_3}U X^{m_2}U X^{m_1}H}|\psi\rangle \end{equation}
which is not equal to:
\begin{equation} \mathbf{H}|\psi\rangle \end{equation}
However, if we only had 2 qubit cluster state and measure the first qubit in X basis, we would get:
\begin{equation} \mathbf{X^{m}H}|\psi\rangle \end{equation}
which is exactly Hadamard gate applied on initial state up to correction.
What am I missing here? Why don't we use two qubit cluster state in representation of Hadamard gate? How does this five qubit cluster state represents Hadamard gate?