# The Matrix formula of this hamilton is different from that found in the paper

I am trying to rewrite the following Hamiltonian in the matrix form, but I get different results. In this article, the Hamiltonian that represents a three-qubit Heisenberg spin chain

and its matrix form:

where

are the Pauli operators that can be calculated from the relation:

where $$I$$ is the 2×2 identity matrix. I wrote and used the following code:

σx = PauliMatrix[1];
σy = PauliMatrix[2];
σz = PauliMatrix[3];
σI = IdentityMatrix[2];

σ1x = KroneckerProduct[σx, σI, σI];
σ2x = KroneckerProduct[σI, σx, σI];
σ3x = KroneckerProduct[σI, σI, σx];
σ1y = KroneckerProduct[σy, σI, σI];
σ2y = KroneckerProduct[σI, σy, σI];
σ3y = KroneckerProduct[σI, σI, σy];
σ1z = KroneckerProduct[σz, σI, σI];
σ2z = KroneckerProduct[σI, σz, σI];
σ3z = KroneckerProduct[σI, σI, σz];

H = J σ1x.σ2x + J σ1y.σ2y + b σ1z + J σ2x.σ3x + J σ2y.σ3y + b σ2z +
J σ3x.σ1x + J σ3y.σ1y + b σ3z + d (σ1x.σ2y - σ1y.σ2x) +
d (σ2x.σ3y - σ2y.σ3x) + d (σ3x.σ1y - σ3y.σ1x);

MatrixForm[H]


But the matrix I got is differing from that mentioned in the article. I make sure that the relations of Pauli Matrices are correct more than once, but I don't know exactly where the error is. Is there an error in my code?

• Without looking too carefully at the result of your calculation, it looks to me like both results are correct. You have just chosen a different order for your basis elements, and so your matrix elements are in different place. You should try to sort things so that you get the block-diagonal form shown. Feb 5, 2020 at 16:42
• Many thanks for the response. Can you please explain more? Feb 5, 2020 at 16:50
• To check if @march is correct, just diagonalize both Hamiltonians using Eigenvalues[ ], and if the eigenvalues are the same then the basis vectors are chosen differently in both forms. Feb 5, 2020 at 16:56
• @Michael Weyrauch, I think Eigenvalues[ ] of both matrices are not the same. There is a multiplying by 2 in some terms appearing in my results. Feb 5, 2020 at 17:06
• I take back my previous comment. Note that if you take $d\to d/2$ and $J\to J/2$, the Hamiltonian you've shown is obtained (except for re-ordering within subspaces) with your code, after applying the transformation in my answer. So either the paper is missing the those factors of 1/2 accidentally, or you didn't read it right. Either way, it's not a problem, because it's just a re-scaling of some of the parameters. Feb 5, 2020 at 17:19

Consider the operator $$\sigma_z=\sum_{i=1}^3\sigma_{i,z},$$ which is

σ1z + σ2z + σ3z // MatrixForm


This operator commutes with the Hamiltonian:

#.H - H.# &@(σ1z + σ2z + σ3z) // Abs // Total // Total
(* 0 *)


Thus, the Hamiltonian can be block-diagonalized according to different eigen-subspaces of $$\sigma_z$$. To do this, we pick out the ordering of the eigenvalues on the diagonal of $$\sigma_z$$ (since it's already diagonal), and change basis to the re-ordered basis:

order = σ1z + σ2z + σ3z // Diagonal // Ordering
H[[order, order]] // MatrixForm
(* {8, 7, 6, 5, 4, 3, 2, 1} *)


Apart from those factors of 2 and re-ordering of the basis elements within the subspaces, these matrices are the same.