| name | feyncalc-qed |
|---|---|
| description | Quantum Electrodynamics calculations with FeynCalc. Use this for: electron/photon scattering, form factors, anomalous magnetic moments (g-2), Compton scattering, pair production, bremsstrahlung, vertex corrections, self-energies, running fine structure constant. Includes extensive QED examples, templates, and curator's guide mapping calculations to physics problems. Intelligent selection: specify your calculation type (tree/1-loop/2-loop) and get relevant examples. |
Quantum Electrodynamics: Electrons, Photons, Precision Tests
Before exploring examples below, consult: guides/QUERY_ROUTER.md
This file helps you quickly identify which example(s) match your QED task:
- 21 QED processes mapped to specific examples
- Tree/1-Loop/2-Loop classification matrix for fast lookup
- Keywords table for process identification
- Learning paths for different backgrounds (beginner → expert)
- O(1) routing - find your calculation instantly
How to use:
- Read your task/goal or process name
- Find matching keyword/process in
guides/QUERY_ROUTER.md - Get directed to 1-2 specific examples (not all 21)
- Load only those examples
- Return to router for next task
File location: feyncalc-qed-skill/guides/QUERY_ROUTER.md
Consult QUERY_ROUTER.md first, then select:
-
Tree-level QED (e→e, γγ→γγ, etc.)
- Load
SELECTION: tree - Go to: Tree-Level Examples
- Load
-
1-Loop QED (g-2, Compton corrections, self-energies)
- Load
SELECTION: oneloop - Go to: 1-Loop Examples
- Load
-
2-Loop & Higher (precision tests, g-2 multi-loop)
- Load
SELECTION: multiloop - Go to: Multi-Loop Examples
- Load
-
Specific Process (not sure which loop order?)
- Go to: Physics Problem Index
Find your calculation:
| Physics Process | Loop Order | Complexity | Best Example |
|---|---|---|---|
| Electron-photon scattering (γe→γe) | Tree | Basic | Compton-Tree |
| Electron propagation | Tree | Basic | ElectronPropagator |
| Photon propagation | Tree | Basic | PhotonPropagator |
| Electron g-2 anomaly | 1-Loop | Intermediate | ElectronGMinus2 |
| Photon self-energy | 1-Loop | Intermediate | PhotonSelfEnergy1L |
| Electron self-energy | 1-Loop | Intermediate | ElectronSelfEnergy1L |
| Compton scattering (loop) | 1-Loop | Advanced | ComptonScattering1L |
| Pair production | 1-Loop | Advanced | PairProduction1L |
| Bremsstrahlung | 1-Loop | Advanced | Bremsstrahlung1L |
| g-2 (Schwinger) | 1-Loop | Intermediate | ElectronGMinus2-Schwinger |
| g-2 (precision 2-loop) | 2-Loop | Expert | ElectronGMinus2-2Loop |
When to use: Classical electrodynamics, leading order approximations
Physics: γ + e → γ + e (tree-level)
Key features:
- Two Feynman diagrams (t-channel, u-channel)
- Spinor algebra with external legs
- Form factor structure
Code structure:
(* 1. Load FeynCalc *)
<< FeynCalc`
(* 2. Define kinematics *)
FCClearScalarProducts[];
ScalarProduct[p1, p1] = m^2; (* electron *)
ScalarProduct[p2, p2] = 0; (* photon *)
(* ... other scalar products ... *)
(* 3. Build amplitude *)
(* t-channel: (p1-k1)^{-1} *)
(* u-channel: (p1-k2)^{-1} *)
(* 4. Contract and simplify *)
amp = Contract[ampTree];
ampSimp = DiracSimplify[amp];Files: See curator's guide for complete examples
When to use: Precision tests, radiative corrections, form factors
Physics: Virtual photon loop correction to electron magnetic moment
Mandelstam structure:
- s = (electron in + photon)²
- t = (electron in - electron out)²
- On-shell: electron² = m², photon² = 0
Key features:
- Box, triangle, bubble topologies
- Form factor decomposition F_1(t), F_2(t)
- Finite result at t=0 (on-shell)
Code pattern:
(* Setup *)
<< FeynCalc`
FCClearScalarProducts[];
ScalarProduct[p, p] = m^2;
ScalarProduct[k, k] = 0;
(* ... *)
(* Generate 1-loop diagrams *)
topos = CreateTopologies[1, 2->2, ...];
diagrams = InsertFields[topos, ...];
amp = FCFAConvert[CreateFeynAmp[diagrams], ...];
(* Simplify *)
ampSimp = OneLoopSimplify[Contract[amp], q];
(* Evaluate *)
result = PaXEvaluate[ampSimp];
(* Extract F_2 *)
F2 = Coefficient[result, ...]; (* anomalous magnetic moment *)Expected result:
a_e = α/(2π) ≈ 0.00116 (leading order)
Experimental value:
a_e = 0.00115965218... (measured to 8 decimal places!)
When to use: Precision phenomenology, theoretical predictions
Physics: Multiple loop corrections to g-2
Key features:
- Multiple 2-loop topologies
- IBP reduction to master integrals
- Numerical or Package-X evaluation
Strategy:
(* 1. Generate 2-loop diagrams *)
topos = CreateTopologies[2, 2->2, ...];
(* 2. Insert fields *)
diagrams = InsertFields[topos, ...];
(* 3. Convert to FeynCalc *)
amp = FCFAConvert[CreateFeynAmp[diagrams], ...];
(* 4. Reduce integrals with FIRE *)
(* Use feyncalc-tools-skill for FIRE setup *)
(* 5. Evaluate master integrals *)
result = PaXEvaluate[...]; (* or numerical via FIESTA *)Spinor[p, m, 1] (* u(p,m) *)
Spinor[p, m, -1] (* v(p,m) *)
SpinorUBar[p, m] (* ū(p,m) *)
GA[μ] (* γ^μ *)
GA[5] (* γ^5 *)
DiracTrace[expr] (* Tr[γ matrices] *)DiracSimplify[expr] (* Dirac algebra *)
OneLoopSimplify[expr, q] (* 1-loop IBP *)
Contract[expr] (* Index contraction *)PaXEvaluate[expr] (* 1-loop analytical *)
LToolsEvaluate[expr] (* Numerical *)For complete guidance, see companion curator's guide with:
- 20+ worked QED examples
- Learning paths (Beginner→Intermediate→Expert)
- Common mistakes and solutions
- Experimental comparison data
- Implementation patterns
Gluon → Photon loop correction to electron propagator
Complexity: 1-Loop, Intermediate Result type: Momentum-dependent function Divergences: UV (renormalization needed) + IR (massless photon)
Electron loop correction to photon
Complexity: 1-Loop, Intermediate
Result type: Momentum-dependent
Special: Only real photons (k²=0) matter
Photon loop on electron-photon vertex
Complexity: 1-Loop, Advanced Form factors: F_1(t), F_2(t), F_3(t) Physical: F_2(0) = anomalous magnetic moment
"MS" (* Minimal subtraction *)
"MSbar" (* Modified MS (standard) *)
"OnShell" (* On-shell scheme *)Z_ψ (* Wavefunction *)
Z_e (* Coupling *)
Z_m (* Mass *)(* 1. Compute bare amplitude *)
ampBare = ...;
(* 2. Evaluate loops *)
ampLoop = PaXEvaluate[ampBare];
(* 3. Apply counter-terms *)
ampRen = RenormalizeQED[ampLoop, "MSbar", μR];| Error | Typical Cause | Solution |
|---|---|---|
Divergent result |
Missing renormalization | Apply counter-terms |
IR divergence |
Massless particles | Add mass regulator or combine with real |
Trace ambiguity |
γ⁵ in loop | Use TraceOfUnsignedPauli->True |
Wrong sign |
Spinor convention | Check u, v ordering |
This skill: QED processes (electrons, photons)
Switch to feyncalc-qcd-skill: Quarks, gluons, color algebra
Switch to feyncalc-tools-skill: Loop integrals, FIRE, FIESTA, numerical
- feyncalc-core: Kinematics, index manipulation
- feyncalc-tools: Loop reduction, numerical evaluation
- feyncalc-qcd: QCD extensions, mixed processes
Complete QED reference: See companion FEYNCALC_FULL_REFERENCE.md
Examples catalog: FEYNCALC_CURATOR_GUIDE.md with 26+ QED examples mapped to physics problems
Functions reference: All QED-specific functions in FEYNHELPERS_REFERENCE.md
Status: QED sub-skill Dependency: Requires feyncalc-core Recommended pair: feyncalc-tools for advanced calculations Version: 1.0
Selection Layer: When you describe your calculation, this skill:
- Identifies if it's tree/1-loop/multi-loop
- Routes to appropriate examples section
- Loads only relevant references
- Provides curator's guide mapping
NOT loaded: QCD color functions, multi-loop tools (use those skills separately)