Abstract
Topological photonics and acoustics have attracted wide research interest for their ability to manipulate light and sound at surfaces. The supercell technique is the conventional standard approach used to calculate these boundary effects, but, as the supercell grows in size, this method requires increasingly large computational resources. Additionally, it falls short in differentiating the surface states at opposite boundaries and, due to finite-size effects, from bulk states. Here, to overcome these limitations, we provide two complementary efficient methods for obtaining the ideal topological surface states of semi-infinite systems of diverse surface configurations. The first is the cyclic reduction method, which is based on iteratively inverting the Hamiltonian for a single unit cell, and the other is the transfer matrix method, which relies on eigenanalysis of a transfer matrix for a pair of unit cells. Numerical benchmarks, including gyromagnetic photonic crystals, valley photonic crystals, spin-Hall acoustic crystals and quadrupole photonic crystals, jointly show that both methods can effectively sort out the boundary modes via the surface density of states, at reduced computational cost and increased speed. Our computational schemes enable direct comparisons with near-field scanning measurements, thereby expediting the exploration of topological artificial materials and the design of topological devices.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$32.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 digital issues and online access to articles
$119.00 per year
only $9.92 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to the full article PDF.
USD 39.95
Prices may be subject to local taxes which are calculated during checkout




Similar content being viewed by others
Data availability
All data in this study were generated by running our codes (ref. 58). Source data are provided with this paper.
Code availability
Source codes associated with this manuscript are available on Zenodo (ref. 58) and via GitHub at https://github.com/YixinSha/SDOS.
References
Yuan, L., Lin, Q., Xiao, M. & Fan, S. Synthetic dimension in photonics. Optica 5, 1396–1405 (2018).
Ozawa, T. et al. Topological photonics. Rev. Mod. Phys. 91, 015006 (2019).
Ma, S., Yang, B. & Zhang, S. Topological photonics in metamaterials. Photonics Insights 1, R02 (2022).
Price, H. et al. Roadmap on topological photonics. J. Phys. Photon. 4, 032501 (2022).
Yang, Z. et al. Topological acoustics. Phys. Rev. Lett. 114, 114301 (2015).
Ma, G., Xiao, M. & Chan, C. T. Topological phases in acoustic and mechanical systems. Nat. Rev. Phys. 1, 281–294 (2019).
Xue, H., Yang, Y. & Zhang, B. Topological acoustics. Nat. Rev. Mater. 7, 974 (2022).
Yang, Y. et al. Non-abelian physics in light and sound. Science 383, eadf9621 (2024).
Chen, M. L. N., Jiang, L., Lan, Z. & Sha, W. E. I. Pseudospin-polarized topological line defects in dielectric photonic crystals. IEEE Trans. Antennas Propag. 68, 609–613 (2019).
Zhang, Z.-D. et al. Topological surface acoustic waves. Phys. Rev. Appl. 16, 044008 (2021).
Zhang, Z. et al. Directional acoustic antennas based on valley–Hall topological insulators. Adv. Mater. 30, 1803229 (2018).
Wu, T. et al. Topological photonic lattice for uniform beam splitting, robust routing, and sensitive far-field steering. Nano Lett. 23, 3866–3871 (2023).
Wang, J.-Q. et al. Extended topological valley-locked surface acoustic waves. Nat. Commun. 13, 1324 (2022).
Bandres, M. A. et al. Topological insulator laser: experiments. Science 359, eaar4005 (2018).
Zeng, Y. et al. Electrically pumped topological laser with valley edge modes. Nature 578, 246–250 (2020).
Farmanbar, M., Amlaki, T. & Brocks, G. Green’s function approach to edge states in transition metal dichalcogenides. Phys. Rev. B 93, 205444 (2016).
Smidstrup, S. et al. First-principles Green’s-function method for surface calculations: a pseudopotential localized basis set approach. Phys. Rev. B 96, 195309 (2017).
Metalidis, G. & Bruno, P. Green’s function technique for studying electron flow in two-dimensional mesoscopic samples. Phys. Rev. B 72, 235304 (2005).
Golub, G. H. & Van Loan, C. F. Matrix Computations (JHU Press, 2013)
Minchev, B. V. Some algorithms for solving special tridiagonal block Toeplitz linear systems. J. Comput. Appl. Math. 156, 179–200 (2003).
Velev, J. & Butler, W. On the equivalence of different techniques for evaluating the Green function for a semi-infinite system using a localized basis. J. Phys. Condens. Matter 16, R637 (2004).
Sancho, M. L., Sancho, J. L., Sancho, J. L. & Rubio, J. Highly convergent schemes for the calculation of bulk and surface Green functions. J. Phys. F 15, 851 (1985).
Lee, D. & Joannopoulos, J. Simple scheme for surface-band calculations. II. The Green’s function. Phys. Rev. B 23, 4997 (1981).
Golub, G. H. & Varga, R. S. Chebyshev semi-iterative methods, successive overrelaxation iterative methods, and second order Richardson iterative methods. Numer. Math. 3, 157–168 (1961).
Hockney, R. W. A fast direct solution of Poisson’s equation using Fourier analysis. J. ACM 12, 95–113 (1965).
Buzbee, B. L., Golub, G. H. & Nielson, C. W. On direct methods for solving Poisson’s equations. SIAM J. Numer. Anal. 7, 627–656 (1970).
Heller, D. Some aspects of the cyclic reduction algorithm for block tridiagonal linear systems. SIAM J. Numer. Anal. 13, 484 (1976).
Umerski, A. Closed-form solutions to surface green’s functions. Phys. Rev. B 55, 5266 (1997).
Colbrook, M. J., Roman, B. & Hansen, A. C. How to compute spectra with error control. Phys. Rev. Lett. 122, 250201 (2019).
Colbrook, M. J., Horning, A., Thicke, K. & Watson, A. B. Computing spectral properties of topological insulators without artificial truncation or supercell approximation. IMA J. Appl. Math. 88, 1 (2023).
Nardelli, M. B. Electronic transport in extended systems: application to carbon nanotubes. Phys. Rev. B 60, 7828 (1999).
Rungger, I. & Sanvito, S. Algorithm for the construction of self-energies for electronic transport calculations based on singularity elimination and singular value decomposition. Phys. Rev. B 78, 035407 (2008).
Reuter, M. G., Seideman, T. & Ratner, M. A. Probing the surface-to-bulk transition: a closed-form constant-scaling algorithm for computing subsurface Green functions. Phys. Rev. B 83, 085412 (2011).
Peng, Y., Bao, Y. & von Oppen, F. Boundary Green functions of topological insulators and superconductors. Phys. Rev. B 95, 235143 (2017).
Thicke, K., Watson, A. B. & Lu, J. Computing edge states without hard truncation. SIAM J. Sci. Comput. 43, B323 (2021).
Lu, J., Marzuola, J. L. & Watson, A. B. Defect resonances of truncated crystal structures. SIAM J. Appl. Math. 82, 49 (2022).
Schomerus, H. Renormalization approach to the analysis and design of Hermitian and non-Hermitian interfaces. Phys. Rev. Res. 5, 043224 (2023).
Wu, Q., Zhang, S., Song, H.-F., Troyer, M. & Soluyanov, A. A. Wanniertools: an open-source software package for novel topological materials. Comput. Phys. Commun. 224, 405–416 (2018).
Cheng, H., Sha, Y., Liu, R., Fang, C. & Lu, L. Discovering topological surface states of dirac points. Phys. Rev. Lett. 124, 104301 (2020).
Sha, Y.-X. et al. Surface density of states on semi-infinite topological photonic and acoustic crystals. Phys. Rev. B 104, 115131 (2021).
Li, Z.-Y. & Ho, K.-M. Light propagation in semi-infinite photonic crystals and related waveguide structures. Phys. Rev. B 68, 155101 (2003).
Che, M. & Li, Z.-Y. Analysis of surface modes in photonic crystals by a plane-wave transfer-matrix method. J. Opt. Soc. Am. A 25, 2177–2184 (2008).
Novotny, L. & Hecht, B. Principles of Nano-optics (Cambridge Univ. Press, 2012)
Carminati, R. et al. Electromagnetic density of states in complex plasmonic systems. Surf. Sci. Rep. 70, 1–41 (2015).
Chew, W. C., Sha, W. E. & Dai, Q. Green’s dyadic, spectral function, local density of states, and fluctuation dissipation theorem. Progr. Electromagn. Res. 166, 147 (2019).
Jin, J.-M. The Finite Element Method in Electromagnetics (Wiley, 2015)
Lee, D. & Joannopoulos, J. Renormalization scheme for the transfer-matrix method and the surfaces of wurtzite ZnO. Phys. Rev. B 24, 6899 (1981).
Vaidya, S., Ghorashi, A., Christensen, T., Rechtsman, M. C. & Benalcazar, W. A. Topological phases of photonic crystals under crystalline symmetries. Phys. Rev. B 108, 085116 (2023).
Pick, A. et al. General theory of spontaneous emission near exceptional points. Opt. Express 25, 12325 (2017).
Lee, D. & Joannopoulos, J. Simple scheme for surface-band calculations. I. Phys. Rev. B 23, 4988 (1981).
Hugonin, J. P. & Lalanne, P. Perfectly matched layers as nonlinear coordinate transforms: a generalized formalization. J. Opt. Soc. Am. A 22, 1844–1849 (2005).
Oskooi, A. F., Zhang, L., Avniel, Y. & Johnson, S. G. The failure of perfectly matched layers, and towards their redemption by adiabatic absorbers. Opt. Express 16, 11376–11392 (2008).
Ma, T. & Shvets, G. All-Si valley–Hall photonic topological insulator. New J. Phys. 18, 025012 (2016).
Yoshimi, H., Yamaguchi, T., Ota, Y., Arakawa, Y. & Iwamoto, S. Slow light waveguides in topological valley photonic crystals. Opt. Lett. 45, 2648–2651 (2020).
Poo, Y., Wu, R.-X., Lin, Z., Yang, Y. & Chan, C. T. Experimental realization of self-guiding unidirectional electromagnetic edge states. Phys. Rev. Lett. 106, 093903 (2011).
He, C. et al. Acoustic topological insulator and robust one-way sound transport. Nat. Phys. 12, 1124–1129 (2016).
He, L., Addison, Z., Mele, E. J. & Zhen, B. Quadrupole topological photonic crystals. Nat. Commun. 11, 3119 (2020).
Sha, Y.-X., Xia, M.-Y., Lu, L. & Yang, Y. Surface density of states in topological photonic and acoustic systems. Zenodo https://doi.org/10.5281/zenodo.16939967 (2025).
Acknowledgements
Y.Y. acknowledges support from the National Natural Science Foundation of China Excellent Young Scientists Fund (12222417), the Hong Kong Research Grants Council through the Early Career Scheme (27300924), a Strategic Topics Grant (STG3/E-704/23-N), the Collaborative Research Fund (C7015-24GF), the Areas of Excellence Scheme (AoE/P-604/25-R), the Startup Fund of The University of Hong Kong, Ms. Belinda Hung, the Asian Young Scientist Fellowship, the Croucher Foundation, the New Cornerstone Science Foundation through the Xplorer Prize, and the Alibaba DAMO Academy Young Fellow Award. M.-Y.X. acknowledges support from the National Natural Science Foundation of China (62231001 and 62171005). L.L. acknowledges support from the National Natural Science Foundation of China (12025409), the Chinese Academy of Sciences through the Project for Young Scientists in Basic Research (YSBR-021) and through the IOP-HKUST-Joint Laboratory for Wave Functional Materials Research.
Author information
Authors and Affiliations
Contributions
Y.-X.S. and L.L. conceived the idea. Y.-X.S. developed the codes, performed the simulations, and drafted the manuscript. All authors discussed the results and revised the paper. Y.Y. supervised the project.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Computational Science thanks the anonymous reviewer(s) for their contribution to the peer review of this work. Primary Handling Editor: Jie Pan, in collaboration with the Nature Computational Science team.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary Information (download PDF )
Supplementary sections 1, Algorithms 1–8 and Fig. 1.
Source data
Source Data Table 1 (download XLSX )
Data in Table 1.
Source Data Fig. 2 (download XLSX )
Data in Fig. 2.
Source Data Fig. 3 (download XLSX )
Data in Fig. 3.
Source Data Fig. 4 (download XLSX )
Data in Fig. 4.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Sha, YX., Xia, MY., Lu, L. et al. Efficient algorithms for the surface density of states in topological photonic and acoustic systems. Nat Comput Sci 5, 1192–1201 (2025). https://doi.org/10.1038/s43588-025-00898-3
Received:
Accepted:
Published:
Version of record:
Issue date:
DOI: https://doi.org/10.1038/s43588-025-00898-3
This article is cited by
-
Efficient methods for facilitating topological photonics and acoustics computation
Nature Computational Science (2025)


