---
title: Photonic crystals and Bragg mirrors
heading: Periodic dielectrics give light a band gap, as periodic potentials give electrons one, and VCSELs, filters and fiber sensors are built on it
eyebrow: B12 · Lesson 27 · Photonic crystals
xp: 40
---

::: hook
Lesson 15 showed that a periodic potential opens gaps in an electron's energy bands where waves reflect from successive planes in phase. Light behaves the same way in a periodic dielectric: alternate two materials with different refractive indices every quarter wavelength, and a band of wavelengths can't propagate at all. The result is a mirror better than any metal, with no absorption. Every VCSEL in a phone's face scanner or a datacenter link has two of them, made of twenty or thirty pairs of semiconductor layers, and fiber Bragg gratings use the same idea along a fiber's core.
:::

::: play
- The curve is the peak reflectance of a quarter-wave stack against the number of high/low index pairs, with light arriving from air onto a substrate of index $n_s$.
- A small index contrast, like GaAs/AlAs (about 3.5 and 3.0), needs twenty or more pairs to reach 99.9%; TiO₂/SiO₂ (2.4 and 1.46) gets there in eight.
- The readouts give the stop band's width as a fraction of its center wavelength, and the pairs needed for 99.9%.
:::

```sim plot
view: graph
x: N = 1..40
y: R = 0..1
slider: h = 1.5..4 step 0.01 = 3.5
slider: l = 1.3..3.5 step 0.01 = 3
slider: s = 1..4 step 0.01 = 3.5
plot: ((1 - s*(h/l)^(2*N))/(1 + s*(h/l)^(2*N)))^2 | label: peak reflectance | samples: 400
marker: R = 0.999 | label: 99.9%
readout: stop band width Δλ/λ = 4/pi*asin((h - l)/(h + l)) | digits: 3
readout: pairs for 99.9% = ln((1 + sqrt(0.999))/(1 - sqrt(0.999))/s)/(2*ln(h/l)) | digits: 3
```

::: predict
## A stack of quarter-wave layers alternating between two lossless dielectrics is made very thick. What does it do at its design wavelength?

- [ ] Absorbs the light
- [ ] Transmits it all, since both materials are transparent
- [x] Reflects essentially all of it
- [ ] Reflects about half

::: reveal
It reflects essentially all of it. Each interface reflects a little, and with quarter-wave layers all the reflections come back in phase, so they add. The light's amplitude decays exponentially into the stack, the way an electron's wave function decays inside a band gap, and nothing is absorbed. Away from the stop band the reflections fall out of phase and the stack transmits.
:::
:::

::: nameit
## Bragg reflection for light

In a medium whose index alternates between $n_H$ and $n_L$ with period Λ, waves reflected from successive periods add in phase at the Bragg wavelength $\lambda_B = 2\bar n\Lambda$. For a **quarter-wave stack**, each layer is $\frac{\lambda_0}{4n}$ thick, and the reflections add most strongly at $\lambda_0$. Inside the stop band no propagating wave exists: the band structure of light has a gap, just as for electrons in lesson 15.

## Peak reflectance

For N pairs, high index first, between an incident medium $n_0$ and a substrate $n_s$, the reflectance at $\lambda_0$ is

$$R = \left(\frac{1 - q}{1 + q}\right)^2, \qquad q = \frac{n_s}{n_0}\left(\frac{n_H}{n_L}\right)^{2N}.$$

Each pair multiplies q by $(n_H/n_L)^2$, so the transmission falls exponentially with N. A large contrast needs few pairs; a small one needs many.

## The stop band

The stop band's full width is

$$\frac{\Delta\lambda}{\lambda_0} = \frac{4}{\pi}\arcsin\frac{n_H - n_L}{n_H + n_L},$$

about 10% for GaAs/AlAs and 31% for TiO₂/SiO₂. Tilting the light shifts the band to shorter wavelengths, roughly as $\lambda(\theta) = \lambda_0\sqrt{1 - \sin^2\theta/n_{eff}^2}$, which is how thin-film filters are angle-tuned.

## Photonic crystals and gratings

Periodic structures in two or three dimensions can have a full photonic band gap, in all directions. A defect in such a crystal, a missing hole or a thicker layer, traps light at a frequency inside the gap: a cavity, as a donor traps an electron below the conduction band. A VCSEL is exactly this, a thin gain region between two Bragg mirrors. A **fiber Bragg grating** is a weak periodic index change written in a fiber's core; it reflects $\lambda_B = 2n_{eff}\Lambda$, and since strain and temperature change Λ and $n_{eff}$, its reflected wavelength is a sensor.
:::

::: example
## A VCSEL's bottom mirror alternates layers of index 3.5 and 3.0 for 850 nm light, between a GaAs cavity and a GaAs substrate (both 3.5). How thick is each layer? What does a 20-pair mirror reflect, seen from air, and how many pairs reach 99.9%?

::: solution
1. **Layer thicknesses.** Quarter-wave layers are
   $$\begin{aligned} \frac{850}{4 \times 3.5} &= 60.7\ \text{nm} \\ \frac{850}{4 \times 3.0} &= 70.8\ \text{nm} \end{aligned}$$
   thick.
2. **Reflectance of 20 pairs.** With $n_0$ = 1 and $n_s$ = 3.5, 20 pairs give $q = 3.5 \times (3.5/3.0)^{40}$ and
   $$\begin{aligned} R &= \left(\frac{1 - q}{1 + q}\right)^2 \\ &= 99.76\% \end{aligned}$$
3. **The q that 99.9% needs.**
   $$\begin{aligned} q &= \frac{1 + \sqrt{0.999}}{1 - \sqrt{0.999}} \\ &= 3998 \end{aligned}$$
4. **Pairs needed.**
   $$\begin{aligned} N &= \frac{\ln(3998/3.5)}{2\ln(3.5/3.0)} \\ &= 22.8 \end{aligned}$$
   or 23 pairs; 30 pairs reach 99.989%.
5. **Why VCSELs need so much.** VCSELs need over 99.9% because their gain region is only a few quantum wells thick, so light must bounce hundreds of times.

**Answer:** the layers are 60.7 nm and 70.8 nm thick, 20 pairs reflect 99.76%, and 23 pairs reach 99.9%.
:::
:::

::: example
## A dielectric mirror for 550 nm uses TiO₂ (2.4) and SiO₂ (1.46) on glass (1.52). What do 8 pairs reflect, and how wide is the stop band?

::: solution
1. **Reflectance.** With 8 pairs, $q = 1.52 \times (2.4/1.46)^{16}$, so R = 99.91%.
2. **Compare with GaAs/AlAs.** The high contrast does with 8 pairs what GaAs/AlAs needs 23 for.
3. **Stop band.**
   $$\begin{aligned} \frac{\Delta\lambda}{\lambda_0} &= \frac{4}{\pi}\arcsin\frac{0.94}{3.86} \\ &= 0.313 \end{aligned}$$
   about 172 nm wide around 550 nm.
4. **Where these stacks are used.** Laser mirrors, dichroic beamsplitters in projectors and cold mirrors in lamps are all stacks like this, often with layer thicknesses varied to shape the band.

**Answer:** 8 pairs reflect 99.91%, and the stop band is about 172 nm wide.
:::
:::

::: example
## A fiber Bragg grating has period 535.6 nm in a fiber with effective index 1.447. What does it reflect, and how far does that move per microstrain, if the shift is 0.78 times the strain?

::: solution
1. **Bragg wavelength.**
   $$\begin{aligned} \lambda_B &= 2n_{eff}\Lambda \\ &= 2 \times 1.447 \times 535.6\ \text{nm} \\ &= 1550.0\ \text{nm} \end{aligned}$$
2. **Shift with strain.** Stretching the fiber lengthens Λ, while the photoelastic effect lowers $n_{eff}$ a little, leaving a net shift of 0.78 times the strain:
   $$0.78 \times 1550\ \text{nm} \times 10^{-6} = 1.2\ \text{pm}$$
   per microstrain.
3. **Sensing.** With an interrogator resolving 1 pm, a single fiber with dozens of gratings at different wavelengths monitors strain along a bridge or a wing.

**Answer:** the grating reflects 1550.0 nm, and the reflection moves 1.2 pm per microstrain.
:::
:::

::: check
kind: parts
given: w = 850 | 980 | 1550; h = 3.5 | 2.4; l = 3 | 1.46

## A quarter-wave mirror for {w} nm alternates layers of index {h} and {l}.

::: part
answer: w/(4*h)
unit: nm
tolerance: 0.5%

### How thick is each high-index layer?

::: misses
- [w/(2*h)] Each layer is a quarter wavelength in its material.
- [any] $d = \frac{\lambda_0}{4n}$.
:::
:::

::: part
answer: w/(4*h) + w/(4*l)
unit: nm
tolerance: 0.5%

### What's the period of the stack?

::: misses
- [any] Add the two quarter-wave thicknesses.
:::
:::
:::

::: check
given: N = 3 | 5 | 8; h = 2.4 | 3.5; l = 1.46 | 3
answer: ((1 - 1.5*(h/l)^(2*N))/(1 + 1.5*(h/l)^(2*N)))^2*100
unit: %
tolerance: 0.01%

## A stack of {N} pairs, index {h} then {l}, sits on glass (1.5) and is lit from air. What's its peak reflectance?

::: right
Right. $R = \left(\frac{1 - q}{1 + q}\right)^2$ with $q = \frac{n_s}{n_0}\left(\frac{n_H}{n_L}\right)^{2N}$.
:::

::: misses
- [((1 - 1.5*(h/l)^N)/(1 + 1.5*(h/l)^N))^2*100] Each pair contributes $(n_H/n_L)^2$.
- [any] Use $(n_H/n_L)^{2N}$.
:::
:::

::: check
given: h = 2.1 | 2.4 | 3.5; l = 1.38 | 1.46 | 3
answer: 4/pi*asin((h - l)/(h + l))*100
unit: %
tolerance: 0.5%

## A quarter-wave stack alternates indices {h} and {l}. How wide is its stop band, as a percentage of the center wavelength?

::: right
Right. $\frac{4}{\pi}\arcsin\frac{n_H - n_L}{n_H + n_L}$.
:::

::: misses
- [(h - l)/(h + l)*100] The width has a factor of $\frac4\pi$ and an arcsine.
- [any] $\frac{4}{\pi}\arcsin\frac{n_H - n_L}{n_H + n_L}$.
:::
:::

::: check
kind: parts
given: n = 1.445 | 1.447 | 1.45; L = 530 | 536; e = 100 | 1000

## A fiber Bragg grating has effective index {n} and period {L} nm.

::: part
answer: 2*n*L
unit: nm
tolerance: 0.5%

### What wavelength does it reflect?

::: misses
- [n*L] The Bragg condition is $\lambda_B = 2n_{eff}\Lambda$.
- [any] $\lambda_B = 2n_{eff}\Lambda$.
:::
:::

::: part
answer: 0.78*2*n*L*e*1e-6*1000
unit: pm
tolerance: 0.5%

### How far does it shift under {e} microstrain?

::: misses
- [any] $0.78\varepsilon\lambda_B$.
:::
:::
:::

::: check
kind: parts
given: R = 99 | 99.9 | 99.99; h = 3.5 | 3.6; l = 2.9 | 3

## A mirror of index {h}/{l} pairs sits on a substrate of index 3.5, lit from air, and must reach {R}%.

::: part
answer: (1 + sqrt(R/100))/(1 - sqrt(R/100))
tolerance: 0.5%

### What value of q does that need?

::: misses
- [any] Solve $\sqrt R = \frac{q - 1}{q + 1}$.
:::
:::

::: part
answer: ln((1 + sqrt(R/100))/(1 - sqrt(R/100))/3.5)/(2*ln(h/l))
tolerance: 0.5%

### How many pairs is that (before rounding up)?

::: misses
- [any] $N = \frac{\ln(q/n_s)}{2\ln(n_H/n_L)}$.
:::
:::
:::

::: check
given: w = 1550 | 1310; t = 10 | 20; n = 1.8 | 2.1
answer: w*sqrt(1 - sin(t*pi/180)^2/n^2)
unit: nm
tolerance: 0.05%

## A thin-film filter centered at {w} nm, with effective index {n}, is tilted {t}°. Where does its band move?

::: right
Right. Tilting shortens the round-trip phase, so the band moves to shorter wavelengths.
:::

::: misses
- [w*cos(t*pi/180)] The angle inside the film is smaller: use $\sqrt{1 - \sin^2\theta/n_{eff}^2}$.
- [any] $\lambda_0\sqrt{1 - \sin^2\theta/n_{eff}^2}$.
:::
:::

::: check
kind: choice

## Why does a periodic stack of transparent layers have a band of wavelengths it won't transmit?

- [ ] One of the layers absorbs those wavelengths
- [x] Reflections from every period add in phase, so the wave can't propagate and decays into the stack
- [ ] The layers scatter light randomly
- [ ] The light is converted to heat at the interfaces

::: right
Right. It's Bragg reflection, the same mechanism that opens gaps in an electron's bands.
:::

::: misses
- [1] Both materials are transparent; nothing is absorbed.
- [3] The reflections are coherent, not random.
- [4] A lossless stack reflects the light rather than absorbing it.
:::
:::

::: check
kind: derivation
vars: h = 1.5..4, l = 1.3..3.5, s = 1..4, N = 1..40

## N quarter-wave pairs of index h then l on a substrate of index s, lit from air.

::: step
answer: s*(h/l)^(2*N)

### What's q?
:::

::: step
answer: ((1 - s*(h/l)^(2*N))/(1 + s*(h/l)^(2*N)))^2

### What's the peak reflectance?
:::

::: step
answer: 4*s*(h/l)^(2*N)/(1 + s*(h/l)^(2*N))^2

### What's the transmittance, 1 − R?
:::

::: right
Right. For large q the transmittance is about 4/q, falling by $(n_H/n_L)^2$ with each pair.
:::
:::

::: check
kind: python

## Write `stack_R(n0, layers, ns, lam)` returning the reflectance at wavelength `lam` of a list of `(index, thickness)` layers between media `n0` and `ns`, using characteristic matrices: each layer is $\begin{pmatrix}\cos\delta & i\sin\delta/n\\ in\sin\delta & \cos\delta\end{pmatrix}$ with $\delta = 2\pi nd/\lambda$.

```python starter
def stack_R(n0, layers, ns, lam):
    return 0.0

print(stack_R(1.0, [(3.5, 850 / 14), (3.0, 850 / 12)] * 20, 3.5, 850))
```

```python solution
import numpy as np

def stack_R(n0, layers, ns, lam):
    M = np.eye(2, dtype=complex)
    for n, d in layers:
        dl = 2 * np.pi * n * d / lam
        A = np.array([[np.cos(dl), 1j * np.sin(dl) / n], [1j * n * np.sin(dl), np.cos(dl)]])
        M = M @ A
    B = M[0, 0] + M[0, 1] * ns
    C = M[1, 0] + M[1, 1] * ns
    r = (n0 * B - C) / (n0 * B + C)
    return float(abs(r) ** 2)

print(stack_R(1.0, [(3.5, 850 / 14), (3.0, 850 / 12)] * 20, 3.5, 850))
```

```python tests
R20 = stack_R(1.0, [(3.5, 850 / 14), (3.0, 850 / 12)] * 20, 3.5, 850)
assert abs(R20 - 0.997603) < 1e-6, f"20 GaAs/AlAs-like pairs reflect 99.7603%; got {R20}"
assert abs(stack_R(1.0, [], 1.5, 500) - 0.04) < 1e-12, "Bare glass reflects 4%."
R = stack_R(1.0, [(2.4, 550 / 9.6), (1.46, 550 / 5.84)] * 8, 1.52, 550)
assert abs(R - 0.999075) < 1e-6, "Eight TiO₂/SiO₂ pairs reflect 99.91% at 550 nm."
assert stack_R(1.0, [(2.4, 550 / 9.6), (1.46, 550 / 5.84)] * 8, 1.52, 800) < 0.5, "Far outside the stop band the stack transmits."
```

::: right
Right. The same matrices handle any stack: antireflection coatings, filters and mirrors with graded layers.
:::
:::

::: explain
## How is a Bragg mirror's stop band like an electron's band gap?

::: model
In both, a wave travels through a medium whose properties repeat with some period. When the wavelength fits the period so that reflections from successive cells return in phase, the forward and backward waves couple strongly and form standing waves. Two such standing waves are possible, one concentrating the wave's energy in the high-index (or low-potential) regions and one in the low-index ones, and they have different frequencies. Between those two frequencies no traveling wave exists: inside the structure the wave decays exponentially, and an incoming wave is reflected. The width of the gap grows with the contrast, the index difference for light and the potential's Fourier component for electrons.
:::
:::

::: practice

::: check
given: h = 2.2 | 3.4; l = 1.45 | 2.9
answer: 4/pi*asin((h - l)/(h + l))*100
unit: %
tolerance: 0.5%

## Stop-band width for indices {h} and {l}, as a percentage?

::: misses
- [any] $\frac{4}{\pi}\arcsin\frac{n_H - n_L}{n_H + n_L}$.
:::
:::

::: check
given: n = 1.446 | 1.452; L = 520 | 540
answer: 2*n*L
unit: nm
tolerance: 0.5%

## Bragg wavelength for $n_{eff}$ = {n}, Λ = {L} nm?

::: misses
- [any] $2n_{eff}\Lambda$.
:::
:::
:::
