# Help with translating Hamiltonian into matrix

Eq. 19 in this paper gives the following Hamiltonian:

$$\sigma_a, \tau_a, \eta_a$$ are respectively the spin, sublattice pseudospin and valley pseudospin respectively.

Normally, I would have chosen a basis convention such as $$\sigma_a, \tau_a, \eta_a$$ and plugged in the $$2\times 2$$ identity matrix for terms that don't appear above. Then I would have taken the Kronecker Delta product. However, in this case, the authors explicitly define $$(s_z,\tau_z\,\eta_z)=(\pm 1, \pm 1, \pm 1)$$ for $$($$up/down, sublattice A/B, valley K/K'$$)$$ respectively. So, as a relatively inexperienced person in the field, I feel like there is some ambiguity. I am having trouble translating the above into a matrix that I can play with numerically. Can someone help me understand the convention here?

I tried two interpretations in Python. np.kron takes the Kronecker product. First attempt:

# Choose basis: (tau_xy, sigma_xyz), replace sz, tauz, etaz by s, tau, eta = +/- 1
# Gives 4-band model, with eye = identity and s_xyz as Pauli matrices
eta = 1; # instead of using eta_z as the Pauli z matrix
h1=h*vf*(eta*kx*np.kron(sx,eye)+ky*np.kron(sy,eye)) # e-e hoppings
h2=lSO*eta*np.kron(eye,sz)*tau # SO coupling
h3=m*np.kron(eye,sz)*tau # break TRS (AFM exchange mag.)
H = h1+h2+h3


Second:

# Choose basis: (eta, sigma, tau) using Pauli matrices for all, but no +/- 1 values.
# Gives 8-band model.
h1=h*vf*(kx*np.kron(sz,np.kron(eye,sx))+ky*np.kron(eye,np.kron(eye,sy))) # e-e hoppings
h2=lSO*np.kron(sz,np.kron(sz,sz)) # SO coupling
h3=m*np.kron(eye,np.kron(sz,sz))# break TRS (AFM exchange mag.)
H = h1+h2+h3


Both of these seem to give me very weird Berry curvature fields when plotted. So, I figured I am doing something wrong. Note: I set $$v_F = 1, \hbar=1$$.

For this type of calculation, I find MATLAB/Octave to be easier, at least for demonstrating what to do. You can add the np. everywhere afterwards if you want to use Python.

$$\eta_z$$ = eta
$$\tau_x$$ = taux
$$\tau_y$$ = tauy
$$\tau_z$$ = tauz
$$m_z$$ = tauz
$$\sigma_z$$ = sigmaz,

and the following scalars:

$$\hbar$$ = hbar
$$v_F$$ = v
$$\lambda_{\textrm{SO}}$$ = lambda,
$$k_x$$ = kx
$$k_y$$ = ky,

the matrix would typically be calculated in the following manner:

eta=kron(kron(kron(eta,eye(length(mz)),eye(length(sigmaz)),eye(length(tauz));
mz=kron(kron(eye(length(eta)),mz),eye(length(mz)+length(sigmaz)+length(tauz)))));
sigmaz=kron(kron(eye(length(eta)+length(mz)),sigmaz),eye(length(tauz)));
tauz=(kron(eye(length(eta)+length(mz)+length(sigmaz)),tauz)));
taux=(kron(eye(length(eta)+length(mz)+length(sigmaz)),taux)));
tauy=(kron(eye(length(eta)+length(mz)+length(sigmaz)),tauy)));

h1 = hbar*v*(eta*kx*taux + ky*tauy);
h2 = lambda*eta*sigmaz*tauz;
h3 = mz*sigmaz*tauz;
H = h1+h2+h3;


The is because typically:

$$\tau_x,\tau_z,$$ and $$\tau_y$$ would all lie in the same Hilbert space, and
$$\eta_z,m_z$$ and $$\sigma_z$$ would each lie in a different Hilbert spaces to everything else.

There's a lot of left and right parentheses which you'd have to be careful about matching, and since there's 6 operators involved across 4 different Hilbert spaces, this is not such a simple example. If you wanted to give a simpler example with fewer operators and types of operators, or to explicitly give each matrix, I could try to simplify my above code. The length(operator) functions can probably all be replaced by 2, but my code works more generally for arbitrary spin (not just spin-1/2 which has eigenvalues $$\pm$$1, but also spin-1 which has eigenvalues -1,0,1, etc.).

• Thank you for helping me understand the underlying problem better! I had a few clarifications to request: 1) I chose all matrices eta through sigmaz to be their 2 x 2 Pauli matrix equivalents. Is this okay? 2) Following that, I added parentheses to some lines to match them up (next comment), but it seems as if eta is of dimensions 16 x 16 whereas the others are different. This seems to cause problems in defining H. 3) The authors use $\pm 1$ for $s_z,\tau_z\,\eta_z$, but now I am not sure how to test specific cases (such as $s_z,\tau_z\,\eta_z=1,-1,1$). Any advice? Commented Jun 16, 2021 at 20:00
• Example code: eta=np.kron(np.kron(np.kron(eta,np.eye(2)),np.eye(2)),np.eye(2));  and mz=np.kron(np.kron(np.eye(2),mz),np.eye(6)); respectively have dimensions 16 x 16 and 24 x 24, whereas others have 12 x 12. Clearly I've fumbled somewhere, because this mismatch is keeping H from being well-defined. Commented Jun 16, 2021 at 20:03
• I believe h1, h2, and h3 should all be 16x16. I'm not at my computer until much later, but I'll look at what might have happened, as soon as I get a chance (today's a very busy day for me). Commented Jun 16, 2021 at 20:34
• thanks, I’ll keep trying! :D Commented Jun 17, 2021 at 5:55