import sys sys.path.append('../code') from init_mooc_nb import * init_notebook() from holoviews.core.options import Cycle %output size=120 pi_ticks = [(-np.pi, r'$-\pi$'), (0, '0'), (np.pi, r'$\pi$')] def ts_modulated_wire(L=50): """Create an infinite wire with a periodic potential Chain lattice, one orbital per site. Returns kwant system. Arguments required in onsite/hoppings: t, mu, mu_lead, A, phase The period of the potential is 2*pi/L. """ omega = 2 * np.pi / L def onsite(site, p): x = site.pos[0] return 2 * p.t - p.mu + p.A * (np.cos(omega * x + p.phase) + 1) def hopping(site1, site2, p): return -p.t sym_lead = kwant.TranslationalSymmetry([-L]) lat = kwant.lattice.chain() syst = kwant.Builder(sym_lead) syst[(lat(x) for x in range(L))] = onsite syst[lat.neighbors()] = hopping return syst def modulated_wire(L=50, dL=10): """Create a pump. Chain lattice, one orbital per site. Returns kwant system. L is the length of the pump, dL is the length of the clean regions next to the pump, useful for demonstration purposes. Arguments required in onsite/hoppings: t, mu, mu_lead, A, omega, phase """ def onsite(site, p): x = site.pos[0] return 2 * p.t - p.mu + p.A * (np.cos(p.omega * x + p.phase) + 1) lead_onsite = lambda site, p: 2 * p.t - p.mu_lead def hopping(site1, site2, p): return -p.t lat = kwant.lattice.chain() syst = kwant.Builder() syst[(lat(x) for x in range(L))] = onsite syst[lat.neighbors()] = hopping sym_lead = kwant.TranslationalSymmetry([-1]) lead = kwant.Builder(sym_lead) lead[lat(0)] = lead_onsite lead[lat.neighbors()] = hopping syst.attach_lead(lead) syst.attach_lead(lead.reversed()) return syst def total_charge(value_array): """Calculate the pumped charge from the list of reflection matrices.""" determinants = [np.linalg.det(r) for r in value_array] charge = np.cumsum(np.angle(np.roll(determinants, -1) / determinants)) charge = charge - charge[0] return charge / (2 * np.pi) MoocVideo("gKZK9IGY9wo", src_location='3.1-intro', res='360') # Plot of the potential in the pumping system as a function of coordinate. # Some part of the leads is shown with a constant potential. # Regions with E < 0 should be shaded to emulate Fermi sea. A = 0.6 L = 10 lamb = (10 / 5.3) / (2 * np.pi) mu = -0.4 mu_lead = -0.8 def f(x): if x < 0.0: return mu_lead if x >= 0.0 and x <= L: return mu + A * (1.0 - np.cos(x / lamb)) if x > L: return mu_lead x = np.linspace(-5, 15, 1000) y = [f(i) for i in x] plt.figure(figsize=(6, 4)) plt.plot(x, y, 'k', lw=1.2) plt.xlim(-2.5, 12.5) plt.ylim(-2, 2) y = [i if i <= 0 else 0 for i in y] plt.fill_between(x, y, 0, color='r', where=np.array(y) < 0.0, alpha=0.5, edgecolor='k', lw='1.5') plt.arrow(2.0, 1.25, 5, 0, head_width=0.15, head_length=1.0, fc='k', ec='k') plt.xlabel('$x$') plt.ylabel('$U(x)$') plt.xticks([]) plt.yticks([]) plt.show() p = SimpleNamespace(t=1, mu=0.0, phase=0.0, A=None) syst = ts_modulated_wire(L=17) def title(p): return "Band structure, $A={:.2}$".format(p.A) kwargs = {'ylims': [-0.2, 1.3], 'xticks': pi_ticks, 'yticks': [0, 0.5, 1.0], 'xdim': r'$k$', 'ydim': r'$E$', 'k_x': np.linspace(-np.pi, np.pi, 101), 'title': title} holoviews.HoloMap({p.A: spectrum(syst, p, **kwargs) for p.A in np.linspace(0, 0.8, 10)}, kdims=[r'$A$']) question = "Why are some levels in the band structure flat while some are not?" answers = ["The flat levels are the ones whose energies are not sensitive to the offset of confining potential.", "Destructive interference of the wave functions in neighboring minima suppresses the dispersion.", "The flat levels are localized deep in the potential minima, " "so the bandwidth is exponentially small.", "The flat levels correspond to filled states, and the rest to empty states."] explanation = ("The dispersion of the bands in a perodic potential appears " "when the wave functions from neighboring minima overlap.") MoocMultipleChoiceAssessment(question=question, answers=answers, correct_answer=2, explanation=explanation) # Same plot as above, but now with an extra rectangular barrier in the # middle, and with arrows both ways showing that the barrier widens. # Plot of the potential in the pumping system as a function of coordinate. # Some part of the leads is shown with a constant potential. # Regions with E < 0 should be shaded to emulate Fermi sea. # Plot of the potential in the pumping system as a function of coordinate. # Some part of the leads is shown with a constant potential. # Regions with E < 0 should be shaded to emulate Fermi sea. A = 0.6 L = 10 lamb = (10 / 5.3) / (2 * np.pi) mu = -0.4 mu_lead = -0.8 a = 4.5 b = 6.5 top = 1.2 def f(x): if x < 0.0: return mu_lead if x >= 0.0 and x <= a: return mu + A * (1.0 - np.cos(x / lamb)) if x > a and x < b: return top if x >= b and x <= L: return mu + A * (1.0 - np.cos(x / lamb)) if x > L: return mu_lead x = np.linspace(-5, 15, 1000) y = [f(i) for i in x] plt.figure(figsize=(6, 4)) plt.plot(x, y, 'k', lw=1.2) plt.xlim(-2.5, 12.5) plt.ylim(-2, 2) y = [i if i <= 0 else 0 for i in y] plt.fill_between(x, y, 0, color='r', where=np.array(y) < 0.0, alpha=0.5, edgecolor='k', lw='1.5') plt.arrow(a, 1.05, -1, 0, head_width=0.1, head_length=0.4, fc='k', ec='k') plt.arrow(b, 1.05, +1, 0, head_width=0.1, head_length=0.4, fc='k', ec='k') plt.xlabel('$x$') plt.ylabel('$U(x)$') plt.xticks([]) plt.yticks([]) plt.show() %%opts Path.Q (color=Cycle(values=['r', 'g', 'b', 'y'])) %%opts HLine (color=Cycle(values=['r', 'g', 'b', 'y']) linestyle='--') def plot_charge(mu): energy = 0.0 phases = np.linspace(0, 2*np.pi, 100) p = SimpleNamespace(t=1, mu=mu, mu_lead=mu, A=0.6, omega= .3) syst = modulated_wire(L=100).finalized() rs = [kwant.smatrix(syst, energy, args=[p]).submatrix(0, 0) for p.phase in phases] wn = -total_charge(rs) title = '$\mu={:.2}$'.format(mu) kdims = [r'$t/T$', r'$q/e$'] plot = holoviews.Path((phases / (2 * np.pi), wn), kdims=kdims, label=title, group='Q') return plot[:, -0.5:3.5](plot={'xticks': [0, 1], 'yticks': [0, 1, 2, 3]}) kwargs = {'ylims': [-0.2, 1.3], 'xticks': pi_ticks, 'yticks': [0, 0.5, 1.0], 'xdim': r'$k$', 'ydim': r'$E$', 'k_x': np.linspace(-np.pi, np.pi, 101), 'title': lambda p: "Band structure, $A={:.2}$".format(p.A)} p = SimpleNamespace(t=1, mu=0.0, phase=0.0, A=0.6) syst = ts_modulated_wire(L=17) mus = [0.1, 0.3, 0.6, 0.9] HLines = holoviews.Overlay([holoviews.HLine(mu) for mu in mus]) spectrum(syst, p, **kwargs) * HLines + holoviews.Overlay([plot_charge(mu) for mu in mus]).relabel('Pumped charge') p = SimpleNamespace(t=1, mu=0.0, mu_lead=0, A=0.6, omega=0.3, phase=None) syst = modulated_wire(L=110).finalized() phases = np.linspace(0, 2*np.pi, 251) en = [np.linalg.eigvalsh(syst.hamiltonian_submatrix(args=[p])) for p.phase in phases] en = np.array(en) ticks = {'xticks': [0, 1], 'yticks': [0, 0.5, 1]} kdims = [r'$t/T$', r'$E$'] holoviews.Path((phases / (2*np.pi), en), kdims=kdims)[:, 0:1.2](plot=ticks) question = ("What happens to the dependence of the reflection phase shift on time if we " "remove one of the reservoirs and leave the other one?") answers = ["It becomes constant.", "For most of the cycle it stays the same, but there appear " "sharp jumps such that the total winding becomes zero.", "Nothing changes, since the two ends of the pump are " "far apart from each other, and the pump is not conducting.", "The reflection phase gets a new time dependence with zero winding, unrelated to the original one."] explanation = ("The total pumped charge must become equal to zero since there's nowhere to place the charge, but " "since the pump is insulating, the phase cannot change " "for most of the cycle unless a sharp resonance appears") MoocMultipleChoiceAssessment(question=question, answers=answers, correct_answer=1, explanation=explanation) MoocVideo("6lXRAZ7hv7E", src_location='3.1-summary', res='360') MoocDiscussion('Questions', 'Quantum pumps')