# The commutation relation $[H_d, \sum_{i = 1}^n \sigma_i^z] = 0$ from the paper about the constrained quantum annealing (CQA)

A quote from the paper "Quantum annealing for constrained optimization" by I. Hen, F. M. Spedalieri:

Let us now consider the driver Hamiltonian $$H_d = - \sum_{i=1}^n \left( \sigma_i^x \sigma_{i+1}^x + \sigma_i^y \sigma_{i+1}^y \right)$$ where the label $$i = n + 1$$ is identified with $$i = 1$$ ... This driver has the following atractive properties (i) as can easily be verified, it obeys $$[H_d, \sum_{i = 1}^n \sigma_i^z] = 0$$; (ii)...

I don't see why $$[H_d, \sum_{i = 1}^2 \sigma_i^z] = 0$$. Note that for $$n=2$$ from this commutation relation we have:

$$H_d \left(\sigma_1^z + \sigma_2^z \right) = \left(\sigma_1^z + \sigma_2^z \right) H_d$$

and

$$H_d = -2\left(\sigma_1^x \sigma_{2}^x + \sigma_1^y \sigma_{2}^y \right)$$

but actually:

$$H_d \left(\sigma_1^z + \sigma_2^z \right) = -\left(\sigma_1^z + \sigma_2^z \right) H_d$$

because $$\sigma^x \sigma^z = -\sigma^z \sigma^x$$ and $$\sigma^y \sigma^z = -\sigma^z \sigma^y$$, hence $$\sigma_1^x \sigma_{2}^x \sigma_1^z = -\sigma_1^z \sigma_1^x \sigma_{2}^x$$ and the similar for other terms. So, in contradiction, instead of commuting operators, we have anticommuting operators $$\{H_d, \sum_{i = 1}^2 \sigma_i^z \} = 0$$. Where is my mistake(s)?

Edit

According to the answers below indeed $$[H_d, \sum_{i = 1}^2 \sigma_i^z] = 0$$. Also, the operators $$H_d$$ and $$\sum_{i = 1}^2 \sigma_i^z$$ (for $$n=2$$) commute and anticommute at the same time and there is no contradiction (as I have wrongly stated above). This is because:

$$H_d \left(\sigma_1^z + \sigma_2^z \right) = \left(\sigma_1^z + \sigma_2^z \right) H_d = 0$$

Let's prove for the first part:

$$H_d \left(\sigma_1^z + \sigma_2^z \right) = -2\left(\sigma_1^x \sigma_{2}^x + \sigma_1^y \sigma_{2}^y \right) \left(\sigma_1^z + \sigma_2^z \right) = \\ =-2\left(-i \sigma_1^y \sigma_{2}^x + i \sigma_1^x \sigma_{2}^y \right) -2\left(-i \sigma_1^x \sigma_{2}^y + i\sigma_1^y \sigma_{2}^x \right) = 0$$

There's the mathematical way of doing this (which I'll do in a moment), and there's a more conceptual side to it. Note that the operator $$\sum Z_i$$ has a bunch of eigenspaces, with eigenvalues $$-N,2-N,4-N,\ldots,N-2,N$$. The eigenspace $$-N+2k$$ is spanned by all basis states comprising $$N-k$$ $$|0\rangle$$s and $$k$$ $$|1\rangle$$s. Now, observe that a term $$X_nX_{n+1}+Y_nY_{n+1}$$ is a hopping term that preserves the number of excitations (the value $$k$$). Specifically it changes the state of the pair of qubits based on $$00\rightarrow00,\quad 01\rightarrow 10,\quad 10\rightarrow 01,\quad 11\rightarrow 11.$$ So, you can see that the eigenspace of the $$\sum_iZ$$ operator does not change under that action. Similarly, the eigenvectors of $$H_d$$ can be grouped in terms of excitation number. An eigenvector of $$H_d$$ within a particular excitation subspace is unchanged by the action $$\sum_iZ_i$$ (because, within that excitation subspace, $$\sum_iZ_i$$ is just a multiple of the identity).

That should make commutation quite clear. For any eigenvector $$|\lambda\rangle$$, $$[H_d,\sum_iZ_i]|\lambda\rangle=0,$$ and if it's true for every eigenvector, it's true for every state. If it's true for every state, the whole operator is 0.

Let's return to doing things the more obvious way. Unfortunately, just applying commutation properties is not very revealing. We want to calculate $$(X_1X_2+Y_1Y_2)(Z_1+Z_2)-(Z_1+Z_2)(X_1X_2+Y_1Y_2).$$ What you want to compare are the two terms $$X_1X_2Z_1-Z_2Y_1Y_2.$$ We recall that $$X_1Z_1=-iY_1$$ and $$Z_2Y_2=-iX_2$$, so this is $$-iY_1X_2+iY_1X_2=0.$$ Other pairs of terms cancel in a similar way.

• Thanks, the explanation with eigenspaces was really insightful. How I understand now $H_d$ and $\sum_{i=1}^2 \sigma_z$ commute and anticommute at the same time and there is no contradiction here (I have added some calculation in the question). – Davit Khachatryan Aug 14 '20 at 9:54
• Yes, your edit is correct. However, it is worth noting that for general $n$, not just $n=2$, there is no anti-commutation. – DaftWullie Aug 14 '20 at 10:13
• One more thing about $|00\rangle \rightarrow |00\rangle$ transformation presented in the answer. When I have tried I have obtained something different $(X X + YY) |00\rangle = |11\rangle - |11\rangle = 0$ and I am not sure how to interpret this. Should I apply $e^{i\theta (XX + YY)}$ instead $H_d = (XX + YY)$ to obtain that transformation? In this case $e^{-i\theta H_d} |01\rangle = \cos(2 \theta) |01\rangle + i \sin(2 \theta) |10\rangle$. – Davit Khachatryan Aug 14 '20 at 18:37
• No, sorry, you’re right. That’s me jumbling the Hamiltonian and the resulting unitary. I’ll fix it when I’m near a proper computer. – DaftWullie Aug 14 '20 at 19:24

Since $$[\sigma_i^k,\sigma_j^k]=0$$, you can expand the first product in $$[H_d, \sum_{i = 1}^2 \sigma_i^z]$$ as \begin{align} (\sigma_1^x \sigma_2^x + \sigma_1^y \sigma_2^y) (\sigma_1^z + \sigma_2^z)= & \sigma_2^x \sigma_1^x \sigma_1^z +\sigma_1^x \sigma_2^x \sigma_2^z + \sigma_2^y \sigma_1^y \sigma_1^z +\sigma_1^y \sigma_2^y \sigma_2^z \\ = & i(-\sigma_2^x \sigma_1^y - \sigma_1^x \sigma_2^y + \sigma_2^y \sigma_1^x + \sigma_1^y \sigma_2^x) \\=&i([\sigma_1^y,\sigma_2^x]+[\sigma_2^y,\sigma_1^x])=0 \end{align}

and the second product as \begin{align} (\sigma_1^z + \sigma_2^z)(\sigma_1^x \sigma_2^x + \sigma_1^y \sigma_2^y)= & \sigma_1^z \sigma_1^x \sigma_2^x +\sigma_2^z \sigma_2^x \sigma_1^x + \sigma_1^z \sigma_1^y \sigma_2^y +\sigma_2^z \sigma_2^y \sigma_1^y \\ = &i(\sigma_1^y \sigma_2^x + \sigma_2^y \sigma_1^x -\sigma_1^x \sigma_2^y - \sigma_2^x \sigma_1^y) \\=&i([\sigma_1^y,\sigma_2^x]+[\sigma_2^y,\sigma_1^x])=0 \end{align} showing that $$[H_d, \sum_{i = 1}^2 \sigma_i^z]=0$$ as claimed.

• Thanks, it was helpful. How I understand now $H_d$ and $\sum_{i=1}^2 \sigma_z$ commute and anticommute at the same time and there is no contradiction here (I have added some calculation in the question). – Davit Khachatryan Aug 14 '20 at 9:42
• I guess there should be $i$ in the equations, because $\sigma_1^{x} \sigma_1^{z} = -i \sigma_1^{y}$ and similarly in other places, am I right? But of course, this doesn't change the proof. – Davit Khachatryan Aug 14 '20 at 10:00
• Note that $[\sigma_1^{y} \sigma_2^x] = 0$ and also other similar terms. By taking this into account it can be shown that the operators commute and anticommute at the same time. – Davit Khachatryan Aug 14 '20 at 10:05
• @DavitKhachatryan Thanks for the comments. Good catch on the factor of $i$, I got a bit sloppy there. To your second comment, I noticed that relationship has to be true for commutation to hold when $n>2$, but I couldn't find support for that assumption in the paper you cited. I'll edit with corrections. – Jonathan Trousdale Aug 14 '20 at 13:18
• I have taken $n=2$ for simplicity and find that the operators anticommute. I was wrongly thinking that it is a manifestation that the operators don't commute. Maybe $n=2$ isn't the best/right choice for understanding the paper. – Davit Khachatryan Aug 14 '20 at 18:55