Tip

Run this Jupyter Notebook locally: Download Notebook

Tutorial Concatenator#

The kpm_tools.kpm_generator.concatenator function offers the possibility to make a concatenated KPM expansion of several operators.

We distinguish Matrix Operators \(M_i\) from Spectral Operators \(O_j(e)\).

To concatenate Matrix Operators it suffices to multiply all the matrix operators in order.

On the other hand, to concatenate Spectral Operators, one must use the KPM expanded vectors of one operator onto the next in reverse order.

In general, we can concatenate

\[M_1 \times O_1(e) \times M_2 \times O_2(e) \times M_3 ... \times O_{n-1}(e) \times M_n\]

To create a concatenated function we just need to provide a list of the Matrix Operators

[M_1, M_2, ..., M_n],

and a list of the coefficient functions that expand the Spectral Operators

[coef_1, coef_2, ..., coef_n-1].

Transport and topological metrics included#

A few special cases implemented in kpm_tools.kpm_funcs are: * Kubo-Bastin Conductivity: kpm_tools.kpm_funcs.conductivity * The operator is \(\sigma^{KB}_{a,b}(e) = 2\pi i [V_a \delta (e)V_b G_A'(e) - V_a G_R'(e)V_b \delta(e)]\), where \(G'_{A,R}\) are the advanced and retarded Green’s function, and \(V_{a,b}\) are the velocity operators in the directions \(a\) and \(b\).

  • Kubo-Greenwood Conductivity: kpm_tools.kpm_funcs.longitudinal_conductivity

    • The operator is \(\sigma^{KG}_{a,a}(e) = V_a \delta (e)V_a \delta(e)\), where \(V_a\) is the velocity operators in the direction \(a\).

  • Local Chern marker: kpm_tools.kpm_funcs.chern_number

    • The operator is \(c = 2\pi i \mathrm{Im}[PXPYP - PYPXP]\), where \(P\) is the projector operator over the occupied states, and \(X, Y\) are the position operators in real space.

Each of these is defined as a particular iteration of the concatenator function.

Below, we demonstrate the equivalence between the Hall conductivity \(\sigma_{xy}\) and and the local Chern marker \(C\) inside the gaps of a topological system.

[1]:
import numpy as np

import kpm_tools
from kpm_tools.hamiltonians import qhe_obc, params_qhe
from kpm_tools.kpm_funcs import chern_number
import kwant

import holoviews as hv
hv.extension()
[2]:
size = 20
fsyst = qhe_obc(length=size, width=size)
[3]:
init_pos = [size/2, size/2]
center_sites = lambda s: np.linalg.norm(
    np.array(s.pos) - init_pos) < 0.2
vector_factory = kwant.kpm.LocalVectors(fsyst, center_sites)
vectors = list(vector_factory)

num_sites = len(fsyst.sites)

kpm_params = {
    "bounds": (-4, 4),
    "energy_resolution": 0.02,
    "num_vectors": None,
    "vector_factory": vectors,
}

cond = kwant.kpm.conductivity(
    fsyst,
    alpha='x',
    beta='y',
    params=params_qhe,
    **kpm_params,
)
cond_xy = np.array([cond(mu=mu, temperature=0.) for mu in cond.energies])

chern_f = chern_number(fsyst, params=params_qhe, **kpm_params)
chern_array = chern_f(cond.energies)
[4]:
(
    hv.Curve(
        (cond.energies, cond_xy.real),
        label=r'$\sigma_{xy}$',
    ).opts(show_grid=True)
    *
    hv.Curve(
        (cond.energies, chern_array.real),
        label=r'$C$',
    )
).redim(
    x=r'$\varepsilon$',
    y=r'$\sigma[e^2/h]$').relabel(
    group='Conductivity of a QHE sample, $\phi=\phi_0/7$',
).opts(
    show_legend=True,
    fig_size=200,
)
[4]: