SSH and Rice-Mele Chains¶
Model. The SSH model is a two-sublattice single-particle tight-binding chain with alternating hoppings. The Rice-Mele model extends SSH by adding staggered onsite potentials.
Typical uses. Boundary-mode demonstrations, topological-chain intuition, dimerization studies, finite-spectrum checks, and quantum-walk test matrices.
Parameters. n_cells is the number of two-site unit cells; t1 and t2 are SSH intra/inter-cell hoppings; hopping is the Rice-Mele baseline hopping; dimerization shifts alternating hoppings; staggering sets sublattice onsite energies; periodic controls boundary conditions.
Useful plots. Sorted spectra, site probabilities of near-zero modes, and comparisons of edge localization across parameters.
import matplotlib.pyplot as plt
import numpy as np
from quantum_lattice_models.models import rice_mele_model, ssh_edge_state_localizations, ssh_model
from quantum_lattice_models.plotting import plot_lattice_spectrum, plot_site_probabilities
from quantum_lattice_models.spectra import eigensystem
n_cells = 12
ssh = ssh_model(n_cells=n_cells, t1=0.35, t2=1.0, periodic=False)
rice_mele = rice_mele_model(n_cells=n_cells, hopping=1.0, dimerization=0.35, staggering=0.4)
print("model | shape | key parameters")
print("--- | --- | ---")
print(f"SSH | {str(ssh.shape):<8s} | t1={ssh.metadata['t1']:.2f}, t2={ssh.metadata['t2']:.2f}, periodic={ssh.metadata['periodic']}")
print(f"Rice-Mele | {str(rice_mele.shape):<8s} | hopping={rice_mele.metadata['hopping']:.2f}, dimerization={rice_mele.metadata['dimerization']:.2f}, staggering={rice_mele.metadata['staggering']:.2f}")
model | shape | key parameters --- | --- | --- SSH | (24, 24) | t1=0.35, t2=1.00, periodic=False Rice-Mele | (24, 24) | hopping=1.00, dimerization=0.35, staggering=0.40
fig, axes = plt.subplots(1, 2, figsize=(9, 3.4), sharey=True)
plot_lattice_spectrum(ssh, ax=axes[0], color="tab:blue")
axes[0].set_title("SSH spectrum")
plot_lattice_spectrum(rice_mele, ax=axes[1], color="tab:orange")
axes[1].set_title("Rice-Mele spectrum")
fig.tight_layout()
values, vectors = eigensystem(ssh)
near_zero = np.argsort(np.abs(values))[:2]
weights = ssh_edge_state_localizations(vectors[:, near_zero], n_cells=n_cells, edge_cells=2)
print("SSH near-zero states")
print("state | energy | edge weight")
print("--- | --- | ---")
for state, energy, weight in zip(near_zero, values[near_zero], weights):
print(f"{state:>5d} | {energy: .6e} | {weight:.6f}")
ax = plot_site_probabilities(vectors[:, near_zero[0]], title="SSH near-zero state probability")
ax.figure.tight_layout()
SSH near-zero states state | energy | edge weight --- | --- | --- 12 | 2.965266e-06 | 0.984994 11 | -2.965266e-06 | 0.984994