.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/topology/plot_zak_phase.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_topology_plot_zak_phase.py: The Zak Phase: Where the SSH Chain's Electrons Sit ======================================================= J. Zak showed in 1989 that the Berry phase acquired by a Bloch state carried once across the Brillouin zone, .. math:: \gamma = \oint \mathbf{A}\cdot d\mathbf{k}\, ,\qquad \mathbf{A} = i\langle u_k|\partial_k u_k\rangle\, , is a property of the whole band -- the *Zak phase* -- and that :math:`\gamma/2\pi` is the centre of the band's Wannier functions in units of the lattice constant: the electronic polarization. With inversion symmetry it is quantized to 0 or :math:`\pi`. In the SSH chain (sites at :math:`x = 0` and :math:`x = 1/2`, intracell hopping :math:`v`, intercell :math:`w`), the occupied band's Wannier function sits on the stronger bond: at the intracell bond centre :math:`x = 1/4` when :math:`v > w`, at the intercell one :math:`x = 3/4` when :math:`w > v`. The two phases differ by :math:`\pi` -- half an electron per cell moved by half a cell -- and the jump is what leaves the end charges and zero modes of an open topological chain. :meth:`~tbkit.kspace.KSpace.berry_phase` and :meth:`~tbkit.kspace.KSpace.wannier_centers` compute both, from the gauge-invariant discrete Wilson loop. .. GENERATED FROM PYTHON SOURCE LINES 29-47 .. code-block:: Python import numpy as np import matplotlib.pyplot as plt from tbkit.lattice import Lattice from tbkit.bridges import finite_system from tbkit.kspace import KSpace from tbkit.plot import Plot def ssh(v, w): lat = Lattice(unit_cell=[{'tag': 'a', 'r0': (0., 0.)}, {'tag': 'b', 'r0': (0.5, 0.)}], prim_vec=[(1., 0.)]) chain = KSpace(lat) chain.set_hopping([{'i': 0, 'j': 1, 'R': (0,), 't': v}, {'i': 1, 'j': 0, 'R': (1,), 't': w}]) return chain .. GENERATED FROM PYTHON SOURCE LINES 48-54 The lattice ----------- Eight cells of the SSH chain (:func:`~tbkit.bridges.finite_system`), orbitals a and b in two colours, bond widths proportional to the hoppings: :math:`v` inside each cell, :math:`w` between cells, for :math:`v > w` (top) and :math:`v < w` (bottom). .. GENERATED FROM PYTHON SOURCE LINES 54-59 .. code-block:: Python fig_lat, axes_lat = plt.subplots(2, 1, figsize=(7, 2.2)) Plot(finite_system(ssh(1., 0.4), 8)).lattice(plt_hop=True, ms=7, c=4., ax=axes_lat[0]) Plot(finite_system(ssh(0.4, 1.), 8)).lattice(plt_hop=True, ms=7, c=4., ax=axes_lat[1]) .. image-sg:: /api/gallery/topology/images/sphx_glr_plot_zak_phase_001.png :alt: plot zak phase :srcset: /api/gallery/topology/images/sphx_glr_plot_zak_phase_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none
.. GENERATED FROM PYTHON SOURCE LINES 60-62 The Wannier centre sits on the strong bond ------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 62-68 .. code-block:: Python for v, w, centre in [(1., 0.4, 0.25), (0.4, 1., 0.75)]: x = ssh(v, w).wannier_centers(0, nk=200)[0] print('v = {}, w = {}: Wannier centre x = {:.6f}'.format(v, w, x)) assert np.isclose(x, centre, atol=1e-8) .. rst-class:: sphx-glr-script-out .. code-block:: none v = 1.0, w = 0.4: Wannier centre x = 0.250000 v = 0.4, w = 1.0: Wannier centre x = 0.750000 .. GENERATED FROM PYTHON SOURCE LINES 69-73 Across the transition: a jump of pi ------------------------------------- The Zak phase is pinned while the gap stays open, and jumps by :math:`\pi` where it closes, at :math:`v = w`. .. GENERATED FROM PYTHON SOURCE LINES 73-90 .. code-block:: Python ratios = np.linspace(0.2, 2., 37) zak = np.array([ssh(r, 1.).berry_phase(0, nk=200) for r in ratios]) centres = (zak / (2*np.pi)) % 1. topo = ratios < 1. assert np.allclose(centres[topo], 0.75, atol=1e-8) assert np.allclose(centres[~topo & ~np.isclose(ratios, 1.)], 0.25, atol=1e-8) print('Wannier centre 3/4 for v < w, 1/4 for v > w: a jump of half a cell (Zak phase pi).') fig, ax = plt.subplots(figsize=(6, 3.6)) ax.plot(ratios, centres, 'o-b') ax.axvline(1., color='k', ls='--', lw=1) ax.set_xlabel('$v/w$') ax.set_ylabel(r'Wannier centre $\gamma/2\pi$') ax.set_title('Zak phase of the SSH chain') fig.set_layout_engine('tight') .. image-sg:: /api/gallery/topology/images/sphx_glr_plot_zak_phase_002.png :alt: Zak phase of the SSH chain :srcset: /api/gallery/topology/images/sphx_glr_plot_zak_phase_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Wannier centre 3/4 for v < w, 1/4 for v > w: a jump of half a cell (Zak phase pi). .. GENERATED FROM PYTHON SOURCE LINES 92-96 The polarization is a property of the band, not of the gauge ------------------------------------------------------------------- Placing both orbitals on the cell origin (``positions=False``) shifts each phase, but not the quantized difference between the two phases. .. GENERATED FROM PYTHON SOURCE LINES 96-101 .. code-block:: Python diff = (ssh(0.4, 1.).berry_phase(0, positions=False) - ssh(1., 0.4).berry_phase(0, positions=False)) % (2*np.pi) assert np.isclose(diff, np.pi) print('Zak-phase difference in the periodic gauge: {:.6f} = pi.'.format(diff)) .. rst-class:: sphx-glr-script-out .. code-block:: none Zak-phase difference in the periodic gauge: 3.141593 = pi. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.077 seconds) .. _sphx_glr_download_api_gallery_topology_plot_zak_phase.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_zak_phase.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_zak_phase.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_zak_phase.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_