.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/condensed/topology/plot_chern_number.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_condensed_topology_plot_chern_number.py: The TKNN Invariant: Exactly Quantized Chern Numbers ========================================================== Thouless, Kohmoto, Nightingale, and den Nijs showed that the quantized Hall conductance is a topological invariant: the integral of the Berry curvature of the occupied Bloch bands over the Brillouin zone, now called the (first) Chern number :math:`C`. Because :math:`C` can only change when a bulk gap closes, it is exact and disorder-independent -- the moment band theory became *topological* band theory. :func:`~physicskit.condensed.topology.compute_berry_curvature` and :func:`~physicskit.condensed.topology.compute_chern_number` implement the Fukui-Hatsugai-Suzuki lattice discretization of this integral, returning exactly quantized integers for any gapped Bloch Hamiltonian. .. GENERATED FROM PYTHON SOURCE LINES 16-23 .. code-block:: Python import numpy as np from physicskit.condensed.models import haldane_model from physicskit.condensed.topology import compute_berry_curvature, compute_chern_number from physicskit.condensed.visualizers import plot_berry_curvature .. GENERATED FROM PYTHON SOURCE LINES 24-28 Any gapped two-band Bloch Hamiltonian -- here, Haldane's model -------------------------------------------------------------------- The FHS algorithm needs nothing but a function ``H(k1, k2)``; it makes no assumption about the model beyond a spectral gap. .. GENERATED FROM PYTHON SOURCE LINES 28-31 .. code-block:: Python H = lambda k1, k2: haldane_model(k1, k2, t=1.0, t2=0.2, phi=np.pi / 2, M=0.0) .. GENERATED FROM PYTHON SOURCE LINES 32-37 Berry curvature concentrated near the gapped Dirac points ------------------------------------------------------------------ The per-plaquette Berry curvature of the lower band is sharply peaked near the honeycomb lattice's two (former) Dirac points, where the time-reversal-breaking mass gap is smallest. .. GENERATED FROM PYTHON SOURCE LINES 37-42 .. code-block:: Python F = compute_berry_curvature(H, grid_size=30, band_index=0) fig, ax = plot_berry_curvature(F) ax.set_title("Berry curvature of the lower Haldane band") .. image-sg:: /api/gallery/condensed/topology/images/sphx_glr_plot_chern_number_001.png :alt: Berry curvature of the lower Haldane band :srcset: /api/gallery/condensed/topology/images/sphx_glr_plot_chern_number_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Text(0.5, 1.0, 'Berry curvature of the lower Haldane band') .. GENERATED FROM PYTHON SOURCE LINES 43-49 Integrating the curvature gives an exact integer ----------------------------------------------------- Summing the curvature over the whole Brillouin zone and dividing by :math:`2\pi` returns an *exact* integer for every band -- not approximately quantized, but exactly, by construction of the FHS link variables. .. GENERATED FROM PYTHON SOURCE LINES 49-53 .. code-block:: Python C = compute_chern_number(H, grid_size=30) print("Chern numbers (per band):", C) print(f"raw curvature sum / 2*pi for the lower band: {F.sum() / (2 * np.pi):.10f}") .. rst-class:: sphx-glr-script-out .. code-block:: none Chern numbers (per band): [1, -1] raw curvature sum / 2*pi for the lower band: 1.0000000000 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.075 seconds) .. _sphx_glr_download_api_gallery_condensed_topology_plot_chern_number.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_chern_number.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_chern_number.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_chern_number.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_