Peacock.jl: Photonic crystals in Julia

The Plane-wave Expansion Approach to Characterising Optical Crystals in k-space otherwise known as Peacock.jl is a Julia package for solving Maxwell’s equations using the Plane Wave Expansion Method (Rumpf, 2006) in order to predict the optical properties of photonic crystals. A photonic crystal is a material whose optical properties arise from its periodic structure (John, 1987; Yablonovitch, 1987), and Peacock.jl is named for the irridescent colours of peacock feathers which arise not from pigmentation but from the scattering of light by photonic crystals (Zi et al., 2003), as shown in Figure 1.

The Plane-wave Expansion Approach to Characterising Optical Crystals in k-space -otherwise known as Peacock.jl -is a Julia package for solving Maxwell's equations using the Plane Wave Expansion Method (Rumpf, 2006) in order to predict the optical properties of photonic crystals. A photonic crystal is a material whose optical properties arise from its periodic structure (John, 1987;Yablonovitch, 1987), and Peacock.jl is named for the irridescent colours of peacock feathers which arise not from pigmentation but from the scattering of light by photonic crystals (Zi et al., 2003), as shown in Figure 1.
The response of a photonic crystal is strongest when the periodicity of the structure is comparable to the wavelength of light. For visible light, photonic crystals are built from components that are just a few hundred nanometers in size. Advances in nanofabrication mean that 'designer' photonic crystals can now be manufactured for unprecedented control over the flow of light, with applications ranging from optical fibers (Knight, 2003) to photonic circuitry (Joannopoulos, Johnson, Winn, & Meade, 2008). Photonic crystals are also a promising platform for materials known as photonic topological insulators (Blanco de Paz, Vergniory, Bercioux, Garcıá-Etxarri, & Bradlyn, 2019; Wang, Guo, & Jiang, 2019;Wu & Hu, 2015). These are the photonic analogue of the electronic topological insulators (Bernevig, Hughes, & Zhang, 2006;Kane & Mele, 2005a, 2005b for which the 2016 Nobel Prize in Physics was awarded, and may allow light to be guided around defects, impurities, and sharp corners without backscattering (Rider et al., 2019).

Statement of need
Peacock.jl provides a user-friendly interface to calculate and analyse the eigensolutions of Maxwell's equations for 2D photonic crystals, with support for non-orthogonal unit cells and 1 inhomogeneous permittivity and/or permeability as in Figure 2a. As well as the common tools for analysing the eigensolutions, such as visualising the eigenmodes or the plotting the eigenvalues on band diagrams as in Figure 2b-e, Peacock.jl also includes built-in Wilson loop methods (Blanco de Paz et al., 2020;Palmer & Giannini, 2020) to study the topological properties of photonic crystals, as in Figure 2f-g.
Although there already exists open-source software to study the eigensolutions of Maxwell's equations for photonic crystals (Johnson & Joannopoulos, 2001) and to study the topological properties of electronic crystals (Gresch et al., 2017), to our knowledge Peacock.jl is the first open-source package for studying topological photonic crystals.

Documentation
Check the online documentation for the latest tutorials, how-to guides, and technical reference.

Loading a crystal
Here we demonstrate how to reproduce the examples of Figure 2, where we analyse a crystal with fragile topology (Blanco de Paz et al., 2019).
For this example, we load the geometry, solver, and high symmetry points of the crystal from the Peacock.Zoo submodule using make_dePaz_frag. If you model your own photonic crystal with Peacock.jl, you can add your geometry to the Zoo submodule to help others reproduce your work.

Plotting the band diagram
To plot a band diagram as in Figure 2e, we must first define the corners of the path through the Brillouin zone. We can use BrillouinZoneCoordinate to attach a label to our coordinates.

Plotting the Wilson loop winding
A winding in the Wilson loop spectrum can indicate a non-trivial topological phase (Blanco de Paz et al., 2020), with the Chern number given by the winding.
First, we define the k-path we want to scan along, labelling the high symmetry points using BrillouinZoneCoordinate.

# Wilson loop of just the second and third bands
In the first figure, the Wilson loops through the Hilbert spaces of bands 2&3 wind with Chern numbers ±1, indicating some non-trivial topology. However, the second figure shows that including the (trivial) acoustic band in the Wilson loop calculation removes the topological winding, and consequently bands 2&3 are said to be 'fragilely topological' (Blanco de Paz et al., 2019).