Last Updated on January 26, 2026 by Dr. Sushanta Barman
According to the de Broglie hypothesis in quantum mechanics, every moving particle is associated with a wave, called a matter wave. This wave nature of matter leads to diffraction and interference, which are familiar from optics. These phenomena have also been experimentally observed for electrons, neutrons, atoms, and molecules.
When a matter wave passes through a periodic structure such as a grating, it produces a diffraction pattern in the near-field regime, which mimics the grating itself like its image. This self-imaging effect is called the Talbot effect, and the image in the diffraction pattern repeatedly forms at specific distances after the grating. This distance is called the Talbot length (\(L_T\)). This self-imaging effect arises from the interference of wavelets emerging from different slits of the grating.
In this tutorial, we will simulate electron matter wave diffraction by a nanostructured grating using a path-integral approach. We will calculate the diffraction pattern after the grating and create a colormap plot of the Talbot pattern, also known as the Talbot carpet. We will use the Python language for our analysis.
Methodology
Model System and Assumptions
Let us consider an electron beam having width \(\sigma\) (full width at half maximum, FWHM) diffracted by a nanostructured grating with periodicity \(d\). The slit openings and opaque bars have the same width (\(d/2\) each). The de Broglie wavelength of the electron is taken as 50 nm, which corresponds to a kinetic energy of 0.6 meV (milli–electron volt). In the simulation, we consider a 2D geometry, where electrons propagate along the \(x\) direction and the grating is placed along the transverse direction \(y\), as shown in Figure 1.
Figure 1. Schematic of the simulation setup. The incident electron wave, having a full width at half maximum (FWHM) \(\sigma\), moves along the \(x\) direction and hits the grating (G), which is oriented along the transverse direction. The grating has a periodicity of \(d\). A screen (S) is placed at a distance \(L_{GS}\) after the grating.
In this geometry, the diffraction occurs only in the transverse direction \(y\), and therefore a one-dimensional transverse model is sufficient to describe the diffraction. The incident electron wave is taken to be a Gaussian wave packet having a beam width \(\sigma\). The grating is modeled as a thin multi-slit transmission mask, which modulates the wave amplitude. After the grating, the wave packet propagates in free space, without external forces or interactions.
The wave packet evolution is computed using a path-integral (Huygens–Fresnel) propagator. For simplicity, we neglect the interaction between electron and grating wall. However, in experiments, this interaction can significantly influence the diffraction pattern. For metallic gratings, it arises from image-charge effects, while for nonconducting gratings, it is caused by Coulomb repulsion from charges accumulated on the grating walls.
Path-Integral Approach
Incident wave packet at the grating plane
At the grating plane \(x=0\), the transverse electron wave is taken to be a Gaussian wave packet,
\[\psi_{\text{in}}(y)= \exp\left[-\frac{(y-y_0)^2}{2\sigma_y^2}\right],\]
where \(\sigma_y\) is related to the FWHM of the incident beam as \(\sigma=2\sqrt{ln(2)}\sigma_y\).
The wave function is normalized numerically such that
\[\int |\psi_{\text{in}}(y)|^2 dy = 1 .\]
Modeling the multi-slit grating
The grating, as shown in Figure 1, is treated as a thin transmission mask described by a function \(T(y)\), which takes the value 1 inside the slit openings and 0 elsewhere. Therefore, the wave function immediately after the grating is
\[\psi_{\text{gr}}(y) = T(y)\psi_{\text{in}}(y).\]
This step imprints the periodic structure of the grating onto the incident electron wave.
For a grating with period \(d\) and de Broglie wavelength \(\lambda_{dB}\), the Talbot length is given by,
\[L_T = \frac{2d^2}{\lambda_{dB}}.\]
To observe near-field self-imaging, the wave is propagated over a range of distances \(x\) spanning several Talbot lengths.
Path-integral (Huygens–Fresnel) propagation
The propagation of the wave function \(\psi_{\text{gr}}(y)\) from the grating plane to a screen at a distance \(x\) is computed using the free-space propagator,
\[G(R) = \frac{e^{ikR}}{R},\quad k=\frac{2\pi}{\lambda},\]
where \(R = \sqrt{(y_s – y)^2 + x^2}\) is the distance between a source point \(y\) on the grating and an observation point \((x,y_s)\) on the screen.
The propagated wave function is obtained from the integral
\[\psi_{screen}(x,y_s)= \int G(R) \psi_{\text{gr}}(y) dy .\]
In the Python code, this integral will be evaluated numerically using a discretized grid.
Intensity calculation and construction of the Talbot carpet
At each propagation distance \(x\), the transverse intensity distribution is computed as
\[ I(x,y_s) = |\psi_{screen}(x,y_s)|^2 .\]
The wave function is normalized at every \(x\) to compensate for the finite simulation window.
By repeating the propagation for many values of \(x\), that is, by changing the grating-to-screen distance, the intensity \(I(x,y_s)\) is stored in a two-dimensional array. Plotting this array as a colormap in the \((x,y)\) plane produces the Talbot carpet, which reveals self-imaging at integer Talbot lengths \(L_T\).
Simulation Parameters
All simulation parameters are listed in Table I below.
| Parameter | Value |
|---|---|
| Particle | Electron |
| Electron mass (me) | 9.11 × 10−31 kg |
| Reduced Planck constant (ℏ) | 1.055 × 10−34 J·s |
| de Broglie wavelength (\(\lambda_{dB}\)) | 50 nm |
| Wave number (k0 = 2π/\(\lambda_{dB}\)) | 1.26 × 108 m−1 |
| Transverse domain size (Ly) | 50 μm |
| Number of transverse grid points (Ny) | 2000 |
| Transverse grid spacing (Δy) | 25 nm |
| Incident beam width (σy) | 10 μm |
| Beam center position (y0) | 0 |
| Slit width (d/2) | 500 nm |
| Barrier width (d/2) | 500 nm |
| Grating period (d) | 1 μm |
| Number of slits (N) | 100 |
| Talbot length (LT = 2d2/\(\lambda_{dB}\)) | 40 μm |
| Propagation distance range (x) | 0.4 μm – 400 μm |
| Number of longitudinal slices (Nx) | 50 |
Python Code
The Python code below implements the path integral approach to calculate the Talbot carpet for electron wave, as discussed above.
📄 Show Code
import numpy as np
import matplotlib.pyplot as plt
# ============================================================
# Talbot carpet simulation
# ============================================================
# --------------------------
# 1) Parameters
# --------------------------
lam = 50e-9 # de Broglie wavelength [m]
k = 2*np.pi/lam # wave number [1/m]
Ly = 50e-6 # transverse domain size [m]
Ny = 2000 # number of transverse grid points
dy = Ly / Ny # transverse grid spacing [m]
sigma_y = 10e-6 # transverse beam width parameter in psi_in(y) [m]
y0 = 0.0 # beam center [m]
d = 1e-6 # grating period [m]
slit_w = d/2 # slit width [m]
bar_w = d/2 # bar width [m]
Nslits = 100 # number of slits (total)
x_min = 0.4e-6 # propagation range start [m]
x_max = 400e-6 # propagation range end [m]
Nx = 50 # number of longitudinal slices (x samples)
# --------------------------
# 2) Grids
# --------------------------
y = (np.arange(Ny) - Ny//2) * dy
x_vals = np.linspace(x_min, x_max, Nx)
# --------------------------
# 3) Incident wave at grating plane
# --------------------------
psi_in = np.exp(-((y - y0)**2) / (2.0 * sigma_y**2)).astype(np.complex128)
psi_in /= np.sqrt(np.sum(np.abs(psi_in)**2) * dy) # Normalize
# --------------------------
# 4) Multi-slit grating transmission mask T(y)
# --------------------------
half_extent = (Nslits * d) / 2.0
within = (np.abs(y) <= half_extent)
y_mod = np.mod(y + half_extent, d)
open_slit = (y_mod < slit_w)
T = (within & open_slit).astype(np.float64)
# Wave immediately after grating
psi0 = (T * psi_in).astype(np.complex128)
# --------------------------
# 5) Path-integral propagation
# psi(x, y_s) = ∫ [exp(i k R)/R] psi0(y) dy
# Discretized: sum_j exp(i k R_sj)/R_sj * psi0(y_j) * dy
# --------------------------
I_xy = np.zeros((Nx, Ny), dtype=np.float64)
for ix, x in enumerate(x_vals):
x2 = x * x
psi_x = np.zeros(Ny, dtype=np.complex128)
# loop over observation points y_s
for s in range(Ny):
dy_vec = y[s] - y # (y_s - y_j) for all j
R = np.sqrt(dy_vec*dy_vec + x2) # distance to all source points
G = np.exp(1j * k * R) / R # kernel G(R)=exp(ikR)/R
psi_x[s] = np.sum(G * psi0) * dy # discrete integral
# Normalize each step (finite window compensation)
psi_x /= np.sqrt(np.sum(np.abs(psi_x)**2) * dy)
I_xy[ix, :] = np.abs(psi_x)**2
# --------------------------
# 6) Plot Talbot carpet (swap axes to match schematic)
# --------------------------
plt.figure(figsize=(7, 4)) # 16:9 aspect ratio
extent = [x_vals[0]*1e6, x_vals[-1]*1e6, y[0]*1e6, y[-1]*1e6] # x in um, y in um
plt.imshow(I_xy.T, aspect='auto', origin='lower', extent=extent, cmap='hot')
plt.xlabel(r"$x\ (\mu\mathrm{m})$")
plt.ylabel(r"$y\ (\mu\mathrm{m})$")
plt.title("Talbot carpet")
plt.colorbar(label=r"$I(x,y)$ (arb. unit)")
# --- Dotted lines at integer Talbot lengths (vertical lines in x) ---
L_T = 2 * d**2 / lam
xT_um = L_T * 1e6
x_min_um = x_vals[0] * 1e6
x_max_um = x_vals[-1] * 1e6
n_start = int(np.ceil(x_min_um / xT_um))
n_end = int(np.floor(x_max_um / xT_um))
for n in range(n_start, n_end + 1):
plt.axvline(n * xT_um, linestyle=":", linewidth=1.0)
plt.tight_layout()
plt.show()
print(f"Talbot length L_T = {L_T*1e6:.2f} um")
Explanation of the Simulation Code
The above code implements matter wave propagation using the path-integral formulation on a discretized transverse grid. First, the incident electron wave is modeled as a Gaussian wave packet \(\psi_{\text{in}}(y)\), which is multiplied by the grating transmission mask \(T(y)\) to obtain the grating-exit wave \(\psi_{gr}(y)=T(y)\psi_{\text{in}}(y)\).
The propagation to a distance \(x\) is then computed by numerically evaluating the Huygens–Fresnel integral using a direct summation over all transverse grid points. The integral is approximated as a discrete Riemann sum. For each propagation distance \(x\), the resulting wave function \(\psi(x,y_s)\) is normalized and the intensity \(I(x,y_s)=|\psi(x,y_s)|^2\) is calculated. Repeating this procedure for many (\(N_x = 50\)) values of \(x\) produces the two-dimensional intensity distribution known as the Talbot carpet.
Results and Discussion
A 2D colormap of the intensity distribution \(I(x,y_s)\) of the diffracted electron wave after the grating is shown in Figure 2. It clearly produces the Talbot carpet, where the diffraction pattern mimics the grating transfer function \(T(y)\) at integer multiples of the Talbot length \(L_T\), as indicated in the figure. This self-imaging continues until a distance of about \(\approx 10 L_T\) after the grating, which has also been reported earlier. Therefore, in this near-field region, as in optics, matter waves also show Talbot phenomena, as successfully demonstrated using the path integral method.
Summary
In this tutorial, we have discussed how the diffraction of an electron wave by a grating can be simulated using the path integral method. In the simulation, we consider a 2D geometry where the electron moves along the \(x\)-direction and encounters a grating with periodicity \(d\). The incident electron is represented by a transverse Gaussian wave packet \(\psi_{in}(y)\). The grating is modeled as a binary transmission mask \(T(y)\) having a value of 1 inside the slits and 0 elsewhere. The wave function \(\psi_{gr}(y)\) immediately after the grating is obtained by multiplying the transmission function with the incident wave function.
The Huygens-Fresnel principle is then used to propagate the wave function from the grating plane to the screen. At this stage, it is assumed that all points within the slit openings act as secondary sources and contribute to the wave amplitude at any point on the screen, with their phases determined by the path difference between the source points and the observation point on the screen. This propagation is implemented using the path integral method with a free-space propagator, as no external force is present between the grating and the screen. In the simulation, the path integral is approximated by a discrete Riemann sum. Finally, the intensity pattern at a screen placed at any position \(x\) after the grating is obtained from the squared modulus of the transverse wave function evaluated at the screen.
This method successfully reproduces the Talbot carpet for an electron wave in the near-field region. It can also be extended to other quantum particles diffracted by a grating. It would be interesting to study the Talbot carpet using a grating with unequal slit and bar widths. In such cases, fractional Talbot patterns appear, where self-images with reduced periodicity emerge at fractional Talbot distances. Moreover, this method can be extended to study the effects of external forces on the Talbot pattern.
References
- Sushanta Barman, "de Broglie Hypothesis: The Wave-Particle Duality of Matter," MatterWaveX.Com, August 25 (2024).
- William B. Case, Mathias Tomandl, Sarayut Deachapunya, and Markus Arndt, "Realization of optical carpets in the Talbot and Talbot-Lau configurations", Optics Express 17, 20966 (2009).
- Sushanta Barman, "Talbot Effect with Matter Waves: Quantum Self-Imaging," MatterWaveX.Com, September 16 (2024).
- Sushanta Barman, "Path-Integral Simulation of Matter Wave Diffraction: Step-by-Step Guide," MatterWaveX.Com, December 21 (2025).
- Konstantin K. Likharev, "The Huygens Principle," Phys.LibreTexts.Org, Accessed on December 21 (2025).
- Sushanta Barman, "Why Physicists Love Gaussian Wave Packets," MatterWaveX.Com, May 25 (2025).
- Eric R. Jones, Roger A. Bach, and Herman Batelaan, “Path integrals, matter waves, and the double slit,” European Journal of Physics 36, 065048 (2015).
- Dennis V. Perepelitsa, “Path Integrals in Quantum Mechanics,” MIT Department of Physics, Cambridge, Massachusetts, Accessed on December 21 (2025).
I am a Fellow of Academic and Research Excellence (FARE) in the Department of Physics at IIT Kanpur. My work focuses on ion-beam optics and matter-wave phenomena. I am also interested in emerging matter-wave technologies.