{'fraction_non_alphanumeric': 0.016574585635359115, 'fraction_numerical': 0.0011049723756906078, 'mean_word_length': 5.291666666666667, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Roundtrip matrix method for calculating the leaky resonant modes of open nanophotonic structures.

We present a numerical method for calculating quasi-normal modes of open nanophotonic structures. The method is based on scattering matrices and a unity eigenvalue of the roundtrip matrix of an internal cavity, and we develop it in detail with electromagnetic fields expanded on Bloch modes of periodic structures. This procedure is simpler to implement numerically and more intuitive than previous scattering matrix methods, and any routine based on scattering matrices can benefit from the method. We demonstrate the calculation of quasi-normal modes for two-dimensional photonic crystals where cavities are side-coupled and in-line-coupled to an infinite W1 waveguide, and we show that the scattering spectrum of these types of cavities can be reconstructed from the complex quasi-normal mode frequency.