pub fn magnetic(
conc: f64,
j: f64,
mz: f64,
nz2: f64,
s: &[CMat; 3],
) -> (CMat, Vec<(f64, CMat)>)Expand description
Classical magnetic impurities of exchange j on a fraction conc of the sites, with moments
of mean ⟨n_z⟩ = mz and second moments ⟨n_z²⟩ = nz2, ⟨n_x²⟩ = ⟨n_y²⟩ = (1 − nz2)/2
(axisymmetric about z), coupled through the spin matrices s = (S_x, S_y, S_z).
Second cumulant of V = p J n·S with a Bernoulli occupation p of mean conc:
conc J² [⟨n_a n_b⟩ − conc ⟨n_a⟩⟨n_b⟩] S_a ⊗ S_b. For moments uniform in n_z ∈ [2 mz − 1, 1]
(the thesis distribution), nz2 = mz² + (1 − mz)²/3.