schr.qed.interaction module

Electron-photon interaction for QED simulations.

This module implements the minimal coupling between electrons and photons, providing a simplified QED system for educational purposes.

class schr.qed.interaction.CoupledQEDSystem(electron_hamiltonian: ~schr.core.base.Hamiltonian, photon_field: ~schr.qed.field.PhotonField, coupling_strength: float = 0.1, hbar: float = 1.0, dtype: ~numpy.dtype = <class 'jax.numpy.complex64'>)[source]

Bases: object

Coupled electron-photon system with minimal coupling.

This class manages the joint evolution of an electron wavefunction and a quantized photon field, including their mutual interaction.

The total Hamiltonian is: H = H_electron + H_field + H_interaction

where H_interaction couples the electron to the photon modes.

electron_hamiltonian

Hamiltonian for the electron.

photon_field

Quantized photon field.

coupling_strength

Strength of electron-photon coupling.

hbar

Reduced Planck constant.

evolve(psi_electron: Array, photon_state: Array, t_span: tuple[float, float], dt: float) tuple[Array, Array][source]

Evolve the coupled electron-photon system.

Uses a simplified evolution scheme that alternates between electron, photon, and interaction terms.

Parameters:
  • psi_electron – Initial electron wavefunction.

  • photon_state – Initial photon field state.

  • t_span – Time interval (t_start, t_end).

  • dt – Time step.

Returns:

Tuple (psi_electron_final, photon_state_final).

Note

This is a simplified implementation for educational purposes. Production code would use proper tensor product spaces and more sophisticated evolution algorithms.

interaction_term(psi_electron: Array, photon_state: Array, mode: int = 0) tuple[Array, Array][source]

Compute the interaction between electron and photon field.

Uses a simplified dipole interaction: H_int = g (a + a†) x̂

where g is the coupling strength, a/a† are photon operators, and x̂ is the electron position operator.

Parameters:
  • psi_electron – Electron wavefunction.

  • photon_state – Photon field state.

  • mode – Photon mode to couple to. Default is 0.

Returns:

Tuple (H_int|ψ_e⟩, H_int|ϕ⟩) acting on electron and photon states.

total_energy(psi_electron: Array, photon_state: Array, t: float, dx: float) float[source]

Compute total energy of the coupled system.

E_total = E_electron + E_photon + E_interaction

Parameters:
  • psi_electron – Electron wavefunction.

  • photon_state – Photon field state.

  • t – Current time.

  • dx – Grid spacing for electron wavefunction.

Returns:

Total energy of the system.

schr.qed.interaction.minimal_coupling_hamiltonian(psi_shape: tuple, dx: float, A: ~collections.abc.Callable[[~jax.Array, float], ~jax.Array], mass: float = 1.0, charge: float = -1.0, hbar: float = 1.0, dtype: ~numpy.dtype = <class 'jax.numpy.complex64'>) Hamiltonian[source]

Create a Hamiltonian with minimal coupling to electromagnetic field.

The minimal coupling replaces the momentum p with p - qA/c, where A is the vector potential, q is the charge, and c is the speed of light.

This gives H = (p - qA)²/(2m) + V for a particle in an EM field.

Parameters:
  • psi_shape – Shape of the electron wavefunction grid.

  • dx – Grid spacing.

  • A – Vector potential function A(x, t).

  • mass – Particle mass. Default is 1.0.

  • charge – Particle charge. Default is -1.0 (electron).

  • hbar – Reduced Planck constant. Default is 1.0.

  • dtype – JAX dtype. Default is complex64.

Returns:

A Hamiltonian object with minimal coupling.

Note

This is a simplified implementation for educational purposes. Production QED would include gauge fixing, renormalization, etc.