Skip to main content

caroli_model/
gamma.rs

1//! 4×4 matrices of the BHZ basis `(E1↑, H1↑, E1↓, H1↓)`, named as in the thesis codes
2//! (`numbers.f90`, 2014 and later). With `s` the spin and `τ` the E/H orbital Pauli matrices:
3//!
4//! | matrix | Kronecker form | role |
5//! |---|---|---|
6//! | `gamma0` | `1` | identity |
7//! | `gamma55` | `τ_z` | mass term |
8//! | `gamma33` | `s_z τ_x` | `A sin k_x` |
9//! | `gamma44` | `τ_y` | `A sin k_y` |
10//! | `gamma13` | `−s_y` | inter-block spin-orbit `λ` (x) |
11//! | `gamma14` | `s_x τ_z` | inter-block spin-orbit `λ` (y) |
12//! | `gamma23`, `gamma31`, `gamma12` | `s_x`, `s_y`, `s_z` | exchange, same-g (`g_E = g_H`) |
13//! | `gamma23p`, `gamma31p`, `gamma12p` | `s_x τ_z`, `s_y τ_z`, `s_z τ_z` | exchange, opposite-g (`g_E = −g_H`) |
14
15use crate::{CMat, c64};
16
17const O: c64 = c64::new(0.0, 0.0);
18const L: c64 = c64::new(1.0, 0.0);
19const I: c64 = c64::new(0.0, 1.0);
20
21fn from_rows(rows: [[c64; 4]; 4]) -> CMat {
22    CMat::from_fn(4, 4, |i, j| rows[i][j])
23}
24
25/// `Γ0 = 1`: the identity, for the `C` and `D` terms.
26pub fn gamma0() -> CMat {
27    from_rows([[L, O, O, O], [O, L, O, O], [O, O, L, O], [O, O, O, L]])
28}
29
30/// `Γ12 = s_z`: the spin `S_z` of the same-g exchange (`g_E = g_H`).
31pub fn gamma12() -> CMat {
32    from_rows([[L, O, O, O], [O, L, O, O], [O, O, -L, O], [O, O, O, -L]])
33}
34
35/// `s_z τ_z`: the spin `S_z` of the opposite-g exchange (`g_E = −g_H`).
36pub fn gamma12p() -> CMat {
37    from_rows([[L, O, O, O], [O, -L, O, O], [O, O, -L, O], [O, O, O, L]])
38}
39
40/// `Γ13 = −s_y`: the inter-block spin-orbit coupling `λ` on the bonds along x.
41pub fn gamma13() -> CMat {
42    from_rows([[O, O, I, O], [O, O, O, I], [-I, O, O, O], [O, -I, O, O]])
43}
44
45/// `Γ14 = s_x τ_z`: the inter-block spin-orbit coupling `λ` on the bonds along y.
46pub fn gamma14() -> CMat {
47    from_rows([[O, O, L, O], [O, O, O, -L], [L, O, O, O], [O, -L, O, O]])
48}
49
50/// `Γ23 = s_x`: the spin `S_x` of the same-g exchange (`g_E = g_H`).
51pub fn gamma23() -> CMat {
52    from_rows([[O, O, L, O], [O, O, O, L], [L, O, O, O], [O, L, O, O]])
53}
54
55/// `s_x τ_z`: the spin `S_x` of the opposite-g exchange (`g_E = −g_H`); the same matrix as [`gamma14`].
56pub fn gamma23p() -> CMat {
57    from_rows([[O, O, L, O], [O, O, O, -L], [L, O, O, O], [O, -L, O, O]])
58}
59
60/// `Γ31 = s_y`: the spin `S_y` of the same-g exchange (`g_E = g_H`).
61pub fn gamma31() -> CMat {
62    from_rows([[O, O, -I, O], [O, O, O, -I], [I, O, O, O], [O, I, O, O]])
63}
64
65/// `s_y τ_z`: the spin `S_y` of the opposite-g exchange (`g_E = −g_H`).
66pub fn gamma31p() -> CMat {
67    from_rows([[O, O, -I, O], [O, O, O, I], [I, O, O, O], [O, -I, O, O]])
68}
69
70/// `Γ33 = s_z τ_x`: the `A sin k_x` term.
71pub fn gamma33() -> CMat {
72    from_rows([[O, L, O, O], [L, O, O, O], [O, O, O, -L], [O, O, -L, O]])
73}
74
75/// `Γ44 = τ_y`: the `A sin k_y` term.
76pub fn gamma44() -> CMat {
77    from_rows([[O, -I, O, O], [I, O, O, O], [O, O, O, -I], [O, O, I, O]])
78}
79
80/// `Γ55 = τ_z`: the mass term, `M` and `B`.
81pub fn gamma55() -> CMat {
82    from_rows([[L, O, O, O], [O, -L, O, O], [O, O, L, O], [O, O, O, -L]])
83}
84
85#[cfg(test)]
86mod tests {
87    use super::*;
88
89    fn mul(a: &CMat, b: &CMat) -> CMat {
90        a * b
91    }
92
93    fn close(a: &CMat, b: &CMat) -> bool {
94        (0..4).all(|i| (0..4).all(|j| (a[(i, j)] - b[(i, j)]).norm() < 1e-15))
95    }
96
97    #[test]
98    fn hermitian_and_involutive() {
99        for g in [
100            gamma12(),
101            gamma12p(),
102            gamma13(),
103            gamma14(),
104            gamma23(),
105            gamma23p(),
106            gamma31(),
107            gamma31p(),
108            gamma33(),
109            gamma44(),
110            gamma55(),
111        ] {
112            assert!(close(&g, &g.adjoint().to_owned()));
113            assert!(close(&mul(&g, &g), &gamma0()));
114        }
115    }
116
117    #[test]
118    fn spin_algebra() {
119        // s_x s_y = i s_z, for both couplings.
120        let i = c64::new(0.0, 1.0);
121        assert!(close(&mul(&gamma23(), &gamma31()), &(&gamma12() * faer::Scale(i))));
122        // opposite-g: (s_x τ_z)(s_y τ_z) = i s_z
123        assert!(close(&mul(&gamma23p(), &gamma31p()), &(&gamma12() * faer::Scale(i))));
124        // gamma13 = -gamma31
125        assert!(close(&gamma13(), &(&gamma31() * faer::Scale(c64::new(-1.0, 0.0)))));
126    }
127}