.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/condensed/topology/plot_ssh_edge_states.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_ssh_edge_states.py: The SSH Model: Zak Phase and Protected Edge States ======================================================== Su, Schrieffer, and Heeger showed that a dimerized chain -- alternating intracell hopping :math:`v` and intercell hopping :math:`w` -- is topologically nontrivial whenever :math:`v < w`: the bulk Zak phase is quantized to :math:`\pi`, and cutting the chain open exposes a pair of protected, exponentially localized zero-energy states, one at each end. This is the earliest example of the bulk-boundary correspondence. :func:`~physicskit.condensed.models.ssh_hamiltonian` gives the closed-form Bloch Hamiltonian, :func:`~physicskit.condensed.topology.zak_phase` computes the bulk invariant from it, and :func:`~physicskit.condensed.models.ssh_lattice_hamiltonian` together with :func:`~physicskit.condensed.tight_binding.build_finite_cluster` exposes the boundary modes on a finite, open chain -- and lets us plot the chain's actual real-space structure rather than an abstract site-index axis. .. GENERATED FROM PYTHON SOURCE LINES 19-28 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.condensed.models import ssh_hamiltonian, ssh_lattice_hamiltonian from physicskit.condensed.tight_binding import build_finite_cluster from physicskit.condensed.topology import zak_phase from physicskit.condensed.visualizers import plot_lattice_structure .. GENERATED FROM PYTHON SOURCE LINES 29-34 The bulk invariant: Zak phase in the two dimerization regimes ------------------------------------------------------------------- The Zak phase is quantized by chiral symmetry to either :math:`0` (trivial, :math:`v>w`) or :math:`\pi` (topological, :math:`vw (trivial): {zak_trivial:.4f} (expect 0)") .. rst-class:: sphx-glr-script-out .. code-block:: none Zak phase, vw (trivial): -0.0000 (expect 0) .. GENERATED FROM PYTHON SOURCE LINES 44-61 Bulk-boundary correspondence: the finite chain's real-space structure ------------------------------------------------------------------------ The Zak phase is a purely bulk (periodic-boundary) quantity. Cutting the topological chain (:math:`vw)", "topological (v protected zero-energy edge states") fig.tight_layout() left_weight, right_weight = density[: len(density) // 2].sum(), density[len(density) // 2 :].sum() print(f"zero-mode weight -- left half: {left_weight:.3f}, right half: {right_weight:.3f}") .. image-sg:: /api/gallery/condensed/topology/images/sphx_glr_plot_ssh_edge_states_001.png :alt: SSH model: Zak phase pi <=> protected zero-energy edge states, Bulk invariant, Zero-mode density, |E| = 2.29e-05 :srcset: /api/gallery/condensed/topology/images/sphx_glr_plot_ssh_edge_states_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none zero-mode weight -- left half: 1.000, right half: 1.000 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.068 seconds) .. _sphx_glr_download_api_gallery_condensed_topology_plot_ssh_edge_states.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ssh_edge_states.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ssh_edge_states.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_ssh_edge_states.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_