pulsesuite.PSTD3D.SBEs

Semiconductor Bloch Equations (SBEs) solver for quantum wire simulations.

This module solves the 1D Semiconductor Bloch equations in support of propagation simulations for a quantum wire.

Attributes

eV

me0

hbar

e0

eps0

pi

twopi

ii

Classes

SBESolver

Class-based SBE solver. Encapsulates all module-level state as instance

Functions

QWCalculator(Exx, Eyy, Ezz, Vrr, rr, q, dt, w, Pxx, ...)

Backward-compatible shim — delegates to _default_solver.

Checkout(p1, p2, C1, C2, D1, D2, w)

Check out coherence matrices from module storage for wire w.

Checkin(p1, p2, p3, C1, C2, C3, D1, D2, D3, w)

Check in updated coherence matrices to module storage for wire w.

Preparation(p2, C2, D2, Ex, Ey, Ez, Vr, w, Heh, Hee, ...)

Prepare Hamiltonians, screening, and dephasing arrays for SBE time step.

CalcH(Meh, Wee, Whh, C, D, p, VC, Heh, Hee, Hhh)

Calculate the Hamiltonian matrices for the semiconductor Bloch equations.

chiqw()

Backward-compatible shim.

getqc()

Backward-compatible shim.

QWArea()

Backward-compatible shim.

ShutOffOptics()

Backward-compatible shim.

ReadQWParams()

Read quantum wire parameters from 'params/qw.params' file.

ReadMBParams()

Read many-body physics control flags from 'params/mb.params' file.

WriteSBEsData(n)

Backward-compatible shim.

ReadSBEsData(Nt)

Backward-compatible shim.

Relaxation(ne, nh, VC, E1D, Rsp, dt, w, WriteFields)

Apply phonon scattering and carrier-carrier relaxation to electron and hole populations.

RelaxationE(ne, nh, VC, E1D)

Calculate electron relaxation rates using many-body perturbation theory.

RelaxationH(ne, nh, VC, E1D)

Calculate hole relaxation rates using many-body perturbation theory.

dpdt(C, D, p, Heh, Hee, Hhh, GamE, GamH, OffP)

Calculate the time derivative of the electron-hole coherence (interband polarization).

dCdt(Cee, Dhh, Phe, Heh, Hee, Hhh, GamE, GamH, OffE)

Calculate the time derivative of the electron-electron coherence.

dDdt(Cee, Dhh, Phe, Heh, Hee, Hhh, GamE, GamH, OffH)

Calculate the time derivative of the hole-hole coherence.

write_statistics(w, dt, ne2, nh2, Re, Rh)

Write statistical data to file.

CalcMeh(Ex, Ey, Ez, w, Meh)

Calculate the dipole-field coupling matrix for electron-hole transitions.

CalcWnn(q0, Vr, Wnn)

Calculate the monopole-potential coupling matrix for carrier-carrier interactions.

CalcXqw(iq, w, kr, fe, fh, Ee, Eh, gap, area, game, ...)

Calculate the linear optical susceptibility χ(q,ω) for a quantum wire.

RecordEpsLqw(Qr, fe, fh, Ee, Eh, gap, area, gamE, ...)

Record the longitudinal dielectric function ε_L(q,ω) and susceptibility χ_L(q,ω).

RecordXqw(kr, fe, fh, Ee, Eh, gap, area, game, gamh, ...)

Record the linear optical susceptibility χ(q,ω) using CalcXqw.

GetArrays(x, qx, kx)

Initialize spatial and momentum arrays for the SBE solver.

MakeKKP()

Create the momentum difference mapping array kkp.

kindex(k)

Convert a continuous momentum value to the nearest grid index.

InitializeSBE(q, rr, r0, Emaxxx, lam, Nw, QW)

Backward-compatible shim — creates a default SBESolver instance.

SBECalculator(Ex, Ey, Ez, Vr, dt, Px, Py, Pz, Re, Rh, ...)

Solve the 1D Semiconductor Bloch Equations and calculate source terms.

InitializeSBE(q, rr, r0, Emaxxx, lam, Nw, QW)

Backward-compatible shim — creates a default SBESolver instance.

QWCalculator(Exx, Eyy, Ezz, Vrr, rr, q, dt, w, Pxx, ...)

Backward-compatible shim — delegates to _default_solver.

chiqw()

Backward-compatible shim.

getqc()

Backward-compatible shim.

QWArea()

Backward-compatible shim.

ShutOffOptics()

Backward-compatible shim.

WriteSBEsData(n)

Backward-compatible shim.

ReadSBEsData(Nt)

Backward-compatible shim.

Module Contents

pulsesuite.PSTD3D.SBEs.eV = 1.602176634e-19
pulsesuite.PSTD3D.SBEs.me0
pulsesuite.PSTD3D.SBEs.hbar
pulsesuite.PSTD3D.SBEs.e0
pulsesuite.PSTD3D.SBEs.eps0
pulsesuite.PSTD3D.SBEs.pi
pulsesuite.PSTD3D.SBEs.twopi
pulsesuite.PSTD3D.SBEs.ii = 1j
pulsesuite.PSTD3D.SBEs.QWCalculator(Exx, Eyy, Ezz, Vrr, rr, q, dt, w, Pxx, Pyy, Pzz, Rho, DoQWP, DoQWDl)

Time-evolve the source terms of the quantum wire for Maxwell’s equations.

Solves the 1D Semiconductor Bloch equations and calculates polarization and charge density source terms for propagation simulations.

Parameters:
  • Exx (ndarray (complex)) – X-component total electric field in propagation space

  • Eyy (ndarray (complex)) – Y-component total electric field in propagation space

  • Ezz (ndarray (complex)) – Z-component electric field in propagation space

  • Vrr (ndarray (complex)) – Potential electric field in propagation space

  • rr (ndarray (float)) – QW spatial array (m)

  • q (ndarray (float)) – QW momentum array (1/m)

  • dt (float) – Time step (s)

  • w (int) – Wire index (which wire to calculate for)

  • Pxx (ndarray (complex)) – X polarization output (modified in-place)

  • Pyy (ndarray (complex)) – Y polarization output (modified in-place)

  • Pzz (ndarray (complex)) – Z polarization output (modified in-place)

  • Rho (ndarray (complex)) – Free charge density output (modified in-place)

  • DoQWP (list) – Boolean flag [should propagator use QW polarization] (modified in-place)

  • DoQWDl (list) – Boolean flag [should propagator use longitudinal field] (modified in-place)

Returns:

All outputs are modified in-place

Return type:

None

Notes

This function: - Updates module-level time counters (xxx, jjj, t) - Allocates arrays on first call - Calls Prop2QW to convert propagation fields to QW fields - Calls SBECalculator to solve the SBEs - Calls QW2Prop to convert back to propagation space - Calculates energy transfer and writes to files - Only activates when field is strong enough (controlled by _wireoff)

pulsesuite.PSTD3D.SBEs.Checkout(p1, p2, C1, C2, D1, D2, w)

Check out coherence matrices from module storage for wire w.

Retrieves previous time steps from module-level arrays for processing.

pulsesuite.PSTD3D.SBEs.Checkin(p1, p2, p3, C1, C2, C3, D1, D2, D3, w)

Check in updated coherence matrices to module storage for wire w.

Stores current and future time steps to module-level arrays.

pulsesuite.PSTD3D.SBEs.Preparation(p2, C2, D2, Ex, Ey, Ez, Vr, w, Heh, Hee, Hhh, VC, E1D, GamE, GamH, OffG, Rsp)

Prepare Hamiltonians, screening, and dephasing arrays for SBE time step.

This function calculates all the arrays needed for one time step of the semiconductor Bloch equations: - Dipole coupling matrix M^{eh} (light-matter interaction) - Monopole coupling matrices W^{ee}, W^{hh} (free-carrier potentials) - Hamiltonian matrices H^{eh}, H^{ee}, H^{hh} (including many-body effects) - Screened Coulomb interaction arrays VC, E1D - Diagonal dephasing rates γ_e, γ_h - Off-diagonal dephasing rates Γ^{off} - Spontaneous emission rates R_sp

Parameters:
  • p2 (ndarray (complex), shape (Nk, Nk)) – Electron-hole coherence matrix at previous time step

  • C2 (ndarray (complex), shape (Nk, Nk)) – Electron-electron coherence matrix at previous time step

  • D2 (ndarray (complex), shape (Nk, Nk)) – Hole-hole coherence matrix at previous time step

  • Ex (ndarray (complex), shape (Nr,)) – Electric field components in momentum space

  • Ey (ndarray (complex), shape (Nr,)) – Electric field components in momentum space

  • Ez (ndarray (complex), shape (Nr,)) – Electric field components in momentum space

  • Vr (ndarray (complex), shape (Nr,)) – Electric potential from free charge in momentum space

  • w (int) – Wire index

  • Heh (ndarray (complex), shape (Nk, Nk)) – Electron-hole Hamiltonian (output, modified in-place)

  • Hee (ndarray (complex), shape (Nk, Nk)) – Electron-electron Hamiltonian (output, modified in-place)

  • Hhh (ndarray (complex), shape (Nk, Nk)) – Hole-hole Hamiltonian (output, modified in-place)

  • VC (ndarray (float), shape (Nr, Nr, 3)) – Screened Coulomb arrays (output, modified in-place)

  • E1D (ndarray (float), shape (Nk, Nk)) – 1D dielectric screening array (output, modified in-place)

  • GamE (ndarray (float), shape (Nk,)) – Electron diagonal dephasing rates (output, modified in-place)

  • GamH (ndarray (float), shape (Nk,)) – Hole diagonal dephasing rates (output, modified in-place)

  • OffG (ndarray (complex), shape (Nk, Nk, 3)) – Off-diagonal dephasing arrays (output, modified in-place)

  • Rsp (ndarray (float), shape (Nk,)) – Spontaneous emission rates (output, modified in-place)

Returns:

All output arrays are modified in-place.

Return type:

None

Notes

The preparation sequence: 1. Initialize all arrays to zero/defaults 2. Extract carrier populations ne, nh from diagonal of C, D 3. Calculate dipole coupling M^{eh} if optics enabled 4. Calculate monopole coupling W^{ee}, W^{hh} if longitudinal field enabled 5. Calculate screened Coulomb arrays VC, E1D 6. Calculate Hamiltonian matrices H^{eh}, H^{ee}, H^{hh} 7. Calculate diagonal dephasing γ_e, γ_h if enabled 8. Calculate off-diagonal dephasing Γ^{off} if enabled 9. Calculate spontaneous emission rates R_sp if enabled

The Hamiltonian includes: - Single-particle energies (diagonal) - Light-matter coupling (via M^{eh}) - Coulomb many-body effects (via VC) - Excitonic correlations (if _Excitons=True)

Module flags control which effects are included: - _Optics: optical field coupling - _LF: longitudinal field effects - _FreePot: free potential effects - _Excitons: excitonic correlations - _DiagDph: diagonal dephasing - _OffDiagDph: off-diagonal dephasing - _Recomb: spontaneous recombination

See also

CalcMeh

Dipole coupling matrix

CalcWnn

Monopole coupling matrix

CalcH

Hamiltonian calculation

CalcScreenedArrays

Screened Coulomb arrays

CalcGammaE, CalcGammaH

OffDiagDephasing2

Off-diagonal dephasing

SpontEmission

Spontaneous emission rates

pulsesuite.PSTD3D.SBEs.CalcH(Meh, Wee, Whh, C, D, p, VC, Heh, Hee, Hhh)

Calculate the Hamiltonian matrices for the semiconductor Bloch equations.

Constructs the effective Hamiltonian matrices that appear in the SBEs, including single-particle energies, light-matter coupling, Coulomb many-body effects, and excitonic correlations.

The Hamiltonians govern the coherent dynamics: - H^{eh}: electron-hole Hamiltonian (drives optical polarization) - H^{ee}: electron-electron Hamiltonian (drives electron coherence) - H^{hh}: hole-hole Hamiltonian (drives hole coherence)

Parameters:
  • Meh (ndarray (complex), shape (Nk, Nk)) – Dipole-field coupling matrix M^{eh}_{k_e,k_h}

  • Wee (ndarray (complex), shape (Nk, Nk)) – Electron monopole-potential coupling W^{ee}_{k1,k2}

  • Whh (ndarray (complex), shape (Nk, Nk)) – Hole monopole-potential coupling W^{hh}_{k1,k2}

  • C (ndarray (complex), shape (Nk, Nk)) – Electron-electron coherence matrix

  • D (ndarray (complex), shape (Nk, Nk)) – Hole-hole coherence matrix

  • p (ndarray (complex), shape (Nk, Nk)) – Electron-hole coherence matrix (interband polarization)

  • VC (ndarray (float), shape (Nr, Nr, 3)) – Screened Coulomb interaction arrays

  • Heh (ndarray (complex), shape (Nk, Nk)) – Output: electron-hole Hamiltonian (modified in-place)

  • Hee (ndarray (complex), shape (Nk, Nk)) – Output: electron-electron Hamiltonian (modified in-place)

  • Hhh (ndarray (complex), shape (Nk, Nk)) – Output: hole-hole Hamiltonian (modified in-place)

Returns:

Hamiltonians Heh, Hee, Hhh are modified in-place.

Return type:

None

Notes

The Hamiltonians are constructed as:

H^{eh}_{k_e,k_h} = M^{eh}_{k_e,k_h} + Σ_q V(q) p^†_{k_e+q,k_h+q}

H^{ee}_{k1,k2} = E_e(k1)δ_{k1,k2} + W^{ee}_{k1,k2}
  • Σ_q V_ee(q) C^†_{k1+q,k2+q}

  • Σ_k [V_ee(q)C_{k,k+q} - V_eh(q)D_{k+q,k}] (q = k1-k2)

H^{hh}_{k1,k2} = E_h(k1)δ_{k1,k2} + W^{hh}_{k1,k2}
  • Σ_q V_hh(q) D^†_{k1+q,k2+q}

  • Σ_k [V_hh(q)D_{k,k+q} - V_eh(q)C_{k+q,k}] (q = k1-k2)

where: - V(q) is the screened Coulomb interaction - q is momentum transfer - † denotes transpose (not conjugate transpose here)

The excitonic terms (involving V and coherence matrices) are included only if _Excitons=True.

If _LF=True (longitudinal field), off-diagonal Coulomb exchange terms are included. If _LF=False, only diagonal terms (k1=k2) are included, which is the Hartree-Fock approximation.

The noq0 array excludes q=0 terms to avoid divergences in the Coulomb interaction.

Loop ranges max(1-k1, 1-k2) to min(Nk-k1, Nk-k2) ensure that k+q stays within array bounds [1, Nk] in Fortran (or [0, Nk-1] in Python).

See also

Preparation

Calls this function to set up Hamiltonians

CalcMeh

Calculates dipole coupling M^{eh}

CalcWnn

Calculates monopole coupling W^{nn}

dpdt, dCdt, dDdt

pulsesuite.PSTD3D.SBEs.chiqw()

Get the current linear optical susceptibility χ(ω).

Returns the module-level variable _chiw which stores the linear susceptibility at the current frequency.

Returns:

chi – Linear optical susceptibility χ(ω) (dimensionless).

Return type:

complex

Notes

This is a simple accessor function that returns the stored value. The susceptibility is calculated elsewhere (e.g., in QWChi1 or CalcXqw) and stored in _chiw.

See also

getqc

Get critical momentum

QWChi1

Calculate linear susceptibility (qwoptics module)

CalcXqw

Calculate susceptibility at given (q,ω)

pulsesuite.PSTD3D.SBEs.getqc()

Get the critical momentum q_c.

Returns the module-level variable _qc which stores the critical momentum for some physical process (e.g., plasmon cutoff, screening length).

Returns:

qc – Critical momentum q_c (rad/m).

Return type:

float

Notes

This is a simple accessor function that returns the stored value. The critical momentum is calculated elsewhere and stored in _qc.

Physical interpretation depends on context: - Plasmon physics: momentum where plasmon dispersion changes character - Screening: inverse screening length (q_c ≈ 1/λ_screen) - Phase transitions: critical wave vector

See also

chiqw

Get linear susceptibility

pulsesuite.PSTD3D.SBEs.QWArea()

Get the quantum wire cross-sectional area.

Returns the module-level variable _area which stores the quantum wire cross-sectional area.

Returns:

area – Quantum wire cross-sectional area (m²).

Return type:

float

Notes

This is a simple accessor function. The area is set during initialization and represents the effective cross-sectional area of the quantum wire.

The area affects: - Carrier density normalization - Optical transition strengths - Coulomb interaction strengths

See also

ReadQWParams

Reads quantum wire parameters including area

pulsesuite.PSTD3D.SBEs.ShutOffOptics()

Disable optical coupling in the SBE calculations.

Sets the module-level flag _Optics to False, which disables the light-matter interaction terms in the Hamiltonian. This is useful for studying purely electronic dynamics without optical fields.

Return type:

None

Notes

When _Optics is False: - Dipole coupling matrix M^{eh} is not calculated - Only electronic Coulomb interactions remain - Useful for equilibration or dark dynamics

To re-enable optics, set _Optics = True directly.

See also

Preparation

Uses _Optics flag to conditionally calculate coupling

CalcMeh

Dipole coupling (only called if _Optics=True)

pulsesuite.PSTD3D.SBEs.ReadQWParams()

Read quantum wire parameters from ‘params/qw.params’ file.

Loads fundamental physical parameters of the quantum wire system from a parameter file and converts units where necessary. Sets module-level variables used throughout the SBE calculations.

File Format

params/qw.params should contain one parameter per line:

L - Wire length (m) Delta0 - Wire thickness (m) gap - Band gap (eV, converted to J) me - Electron effective mass (units of me0) mh - Hole effective mass (units of me0) HO - Energy level separation (eV, converted to J) gam_e - Electron dephasing rate (Hz) gam_h - Hole dephasing rate (Hz) gam_eh - Interband dephasing rate (Hz) epsr - Relative permittivity (dimensionless) Oph - Phonon energy (eV, converted to Hz) Gph - Phonon damping rate (eV, converted to Hz) Edc - DC electric field (V/m) jmax - Output interval (time steps) ntmax - Maximum time steps

returns:

Module-level variables are set.

rtype:

None

Notes

Unit conversions performed: - gap: eV → J (multiply by e0) - me, mh: units of me0 → kg (multiply by me0) - HO: eV → J (multiply by e0) - Oph: eV → Hz (multiply by e0/hbar) - Gph: eV → Hz (multiply by e0/hbar)

Module variables set: _L, _Delta0, _gap, _me, _mh, _HO, _gam_e, _gam_h, _gam_eh, _epsr, _Oph, _Gph, _Edc, _jmax, _ntmax

See also

ReadMBParams

Read many-body physics flags

pulsesuite.PSTD3D.SBEs.ReadMBParams()

Read many-body physics control flags from ‘params/mb.params’ file.

Loads boolean flags that control which physical effects are included in the many-body semiconductor Bloch equation calculations. Also sets the Lorentzian delta function flag for numerical integration.

File Format

params/mb.params should contain one flag per line (T/F or 1/0):

Optics - Include optical field coupling Excitons - Include excitonic correlations EHs - Include carrier-carrier scattering Screened - Use screened Coulomb interaction Phonon - Include phonon scattering DCTrans - Include DC transport LF - Include longitudinal field FreePot - Include free potential DiagDph - Include diagonal dephasing OffDiagDph - Include off-diagonal dephasing Recomb - Include spontaneous recombination PLSpec - Calculate photoluminescence spectrum ignorewire - Ignore wire effects Xqwparams - Write susceptibility parameters LorentzDelta - Use Lorentzian delta function

returns:

Module-level flags are set.

rtype:

None

Notes

These flags provide fine-grained control over the physics:

  • _Optics: Enable/disable light-matter interaction

  • _Excitons: Include excitonic Coulomb correlations in Hamiltonian

  • _EHs: Include carrier-carrier scattering (MBCE, MBCH)

  • _screened: Use screened vs bare Coulomb interaction

  • _Phonon: Include carrier-phonon scattering (MBPE, MBPH)

  • _DCTrans: Include DC transport and drift

  • _LF: Include longitudinal field (plasmons, screening)

  • _FreePot: Include free-carrier potential

  • _DiagDph: Momentum-dependent dephasing rates

  • _OffDiagDph: Off-diagonal dephasing (correlations)

  • _Recomb: Spontaneous electron-hole recombination

  • _PLSpec: Track photoluminescence

  • _ignorewire: Single-wire approximation

  • _Xqwparams: Write χ(q,ω) parameter file

The LorentzDelta flag is passed to SetLorentzDelta in the coulomb module to control numerical delta function representation.

See also

ReadQWParams

Read physical parameters

SetLorentzDelta

Set delta function representation (coulomb module)

pulsesuite.PSTD3D.SBEs.WriteSBEsData(n)

Write SBE coherence matrices to backup files.

Saves the current state of all coherence matrices (electron-hole, electron-electron, hole-hole) at three time steps to disk for backup or restart purposes.

Parameters:

n (int) – File index for output filenames (e.g., n=100 creates CC1.100.dat)

Returns:

  • None – Data is written to files in ‘dataQW/backup/’ directory.

  • Files Created

  • ————-

  • For each time step (1, 2, 3) and each matrix type (CC, DD, YY) – dataQW/backup/CC1.{n}.dat - Electron coherence, step 1 dataQW/backup/CC2.{n}.dat - Electron coherence, step 2 dataQW/backup/CC3.{n}.dat - Electron coherence, step 3 dataQW/backup/DD1.{n}.dat - Hole coherence, step 1 dataQW/backup/DD2.{n}.dat - Hole coherence, step 2 dataQW/backup/DD3.{n}.dat - Hole coherence, step 3 dataQW/backup/YY1.{n}.dat - e-h coherence, step 1 dataQW/backup/YY2.{n}.dat - e-h coherence, step 2 dataQW/backup/YY3.{n}.dat - e-h coherence, step 3

  • Data Format

  • ———–

  • Each file contains complex values written as – real_part imaginary_part

  • One matrix element per line, nested loops over wire, k2, k1.

Notes

The three time steps correspond to the leapfrog integration scheme: - Step 1: Previous time (t - dt) - Step 2: Current time (t) - Step 3: Next time (t + dt)

Data is written for all wires and all momentum indices.

File size scales as: Nwires × Nk × Nk × 2 (complex) × 3 (time steps) × 9 (matrices)

See also

ReadSBEsData

Read coherence matrices from backup files

Checkin, Checkout

pulsesuite.PSTD3D.SBEs.ReadSBEsData(Nt)

Read SBE coherence matrices from backup files.

Loads the saved state of all coherence matrices (electron-hole, electron-electron, hole-hole) at three time steps from disk for restart or analysis purposes.

Parameters:

Nt (int) – File index for input filenames (e.g., Nt=100 reads CC1.100.dat)

Returns:

  • None – Module-level arrays _CC1, _CC2, _CC3, _DD1, _DD2, _DD3, _YY1, _YY2, _YY3 are updated.

  • Files Read

  • ———-

  • For each time step (1, 2, 3) and each matrix type (CC, DD, YY) – dataQW/backup/CC1.{Nt}.dat - Electron coherence, step 1 dataQW/backup/CC2.{Nt}.dat - Electron coherence, step 2 dataQW/backup/CC3.{Nt}.dat - Electron coherence, step 3 dataQW/backup/DD1.{Nt}.dat - Hole coherence, step 1 dataQW/backup/DD2.{Nt}.dat - Hole coherence, step 2 dataQW/backup/DD3.{Nt}.dat - Hole coherence, step 3 dataQW/backup/YY1.{Nt}.dat - e-h coherence, step 1 dataQW/backup/YY2.{Nt}.dat - e-h coherence, step 2 dataQW/backup/YY3.{Nt}.dat - e-h coherence, step 3

  • Data Format

  • ———–

  • Each file contains complex values as – real_part imaginary_part

  • One matrix element per line, nested loops over wire, k2, k1.

Notes

This function is used to restart simulations from a saved state. The data must match the current grid dimensions (Nk, Nwires).

The three time steps enable continuation of the leapfrog integration without loss of temporal accuracy.

After reading, the simulation can continue from time Nt·dt using the loaded coherence matrices.

See also

WriteSBEsData

Write coherence matrices to backup files

Checkin, Checkout

pulsesuite.PSTD3D.SBEs.Relaxation(ne, nh, VC, E1D, Rsp, dt, w, WriteFields)

Apply phonon scattering and carrier-carrier relaxation to electron and hole populations.

This function calculates the time evolution of carrier populations due to many-body scattering processes including: - Electron-electron scattering - Hole-hole scattering - Electron-hole scattering - Electron-phonon scattering - Hole-phonon scattering - Spontaneous electron-hole recombination

The scattering rates are calculated using many-body perturbation theory and applied using an exact exponential solution to the rate equations.

Parameters:
  • ne (ndarray (complex), shape (Nk,)) – Electron occupation numbers for each momentum state k. Modified in-place to apply relaxation effects.

  • nh (ndarray (complex), shape (Nk,)) – Hole occupation numbers for each momentum state k. Modified in-place to apply relaxation effects.

  • VC (ndarray (float), shape (Nk, Nk, 3)) – Real-time screened Coulomb interaction arrays. VC[:,:,0] - electron-hole interaction VC[:,:,1] - electron-electron interaction VC[:,:,2] - hole-hole interaction

  • E1D (ndarray (float), shape (Nk, Nk)) – Real-time 1D dielectric screening array used for carrier-photon coupling calculations.

  • Rsp (ndarray (float), shape (Nk,)) – Spontaneous emission rate for each momentum state (Hz). Used if _Recomb is True.

  • dt (float) – Time step for integration (seconds).

  • w (int) – Wire index identifying which quantum wire is being calculated.

  • WriteFields (bool) – If True, write scattering rates to output files via printITR.

Returns:

ne and nh are modified in-place.

Return type:

None

Notes

The carrier population evolution is governed by:

dn_e/dt = W_in^e * (1 - n_e) - W_out^e * n_e dn_h/dt = W_in^h * (1 - n_h) - W_out^h * n_h

where W_in and W_out are the in-scattering and out-scattering rates.

This is solved exactly as: n(t+dt) = exp(-W*dt) * [(-1 + exp(W*dt) + n)*W_in + n*W_out] / W where W = W_in + W_out

This exponential solution is more accurate than a simple Euler step and remains stable even for large time steps or scattering rates.

If spontaneous recombination is enabled (_Recomb=True), an additional decay is applied: n_e(t+dt) = n_e * exp(-R_sp * n_h * dt) n_h(t+dt) = n_h * exp(-R_sp * n_e * dt)

The scattering rates are calculated by RelaxationE and RelaxationH which call the many-body perturbation theory functions MBPE and MBPH from the phonons module.

Note

Possible Modifications: WinE, WoutE, WinH, WoutH could be inplace arguments.

Examples

>>> ne = np.array([0.1, 0.2, 0.3], dtype=complex)
>>> nh = np.array([0.1, 0.2, 0.3], dtype=complex)
>>> VC = np.zeros((3, 3, 3))
>>> E1D = np.zeros((3, 3))
>>> Rsp = np.zeros(3)
>>> Relaxation(ne, nh, VC, E1D, Rsp, 1e-15, 0, False)
pulsesuite.PSTD3D.SBEs.RelaxationE(ne, nh, VC, E1D)

Calculate electron relaxation rates using many-body perturbation theory.

Computes in-scattering (W_in) and out-scattering (W_out) rates for electrons due to: - Carrier-carrier scattering (electron-electron, electron-hole) - Carrier-phonon scattering (electron-LO phonon, electron-acoustic phonon)

The rates are calculated using second-order Born approximation within the screened Hartree-Fock approximation, accounting for Pauli blocking factors.

Parameters:
  • ne (ndarray (complex), shape (Nk,)) – Electron occupation numbers for each momentum state

  • nh (ndarray (complex), shape (Nk,)) – Hole occupation numbers for each momentum state

  • VC (ndarray (float), shape (Nk, Nk, 3)) – Screened Coulomb interaction matrices

  • E1D (ndarray (float), shape (Nk, Nk)) – One-dimensional dielectric screening array

Returns:

  • WinE (ndarray (float), shape (Nk,)) – In-scattering rate into each electron state (Hz). W_in^e(k) represents the rate of scattering INTO state k.

  • WoutE (ndarray (float), shape (Nk,)) – Out-scattering rate from each electron state (Hz). W_out^e(k) represents the rate of scattering OUT OF state k.

Notes

The scattering rates satisfy detailed balance and ensure proper thermalization. Pauli exclusion is enforced through (1-n_e) factors.

Calls MBPE (Many-Body Perturbation theory for Electrons) from the phonons module, which implements the full quantum kinetic theory calculation.

Note

Possible Modifications: WinE and WoutE could be inplace arguments.

See also

RelaxationH

Equivalent calculation for holes

MBPE

The underlying many-body calculation (in phonons module)

pulsesuite.PSTD3D.SBEs.RelaxationH(ne, nh, VC, E1D)

Calculate hole relaxation rates using many-body perturbation theory.

Computes in-scattering (W_in) and out-scattering (W_out) rates for holes due to: - Carrier-carrier scattering (hole-hole, hole-electron) - Carrier-phonon scattering (hole-LO phonon, hole-acoustic phonon)

The rates are calculated using second-order Born approximation within the screened Hartree-Fock approximation, accounting for Pauli blocking factors.

Parameters:
  • ne (ndarray (complex), shape (Nk,)) – Electron occupation numbers for each momentum state

  • nh (ndarray (complex), shape (Nk,)) – Hole occupation numbers for each momentum state

  • VC (ndarray (float), shape (Nk, Nk, 3)) – Screened Coulomb interaction matrices

  • E1D (ndarray (float), shape (Nk, Nk)) – One-dimensional dielectric screening array

Returns:

  • WinH (ndarray (float), shape (Nk,)) – In-scattering rate into each hole state (Hz). W_in^h(k) represents the rate of scattering INTO state k.

  • WoutH (ndarray (float), shape (Nk,)) – Out-scattering rate from each hole state (Hz). W_out^h(k) represents the rate of scattering OUT OF state k.

Notes

The scattering rates satisfy detailed balance and ensure proper thermalization. Pauli exclusion is enforced through (1-n_h) factors.

Calls MBPH (Many-Body Perturbation theory for Holes) from the phonons module, which implements the full quantum kinetic theory calculation.

Note

Possible Modifications: WinH, WoutH could be inplace arguments.

See also

RelaxationE

Equivalent calculation for electrons

MBPH

The underlying many-body calculation (in phonons module)

pulsesuite.PSTD3D.SBEs.dpdt(C, D, p, Heh, Hee, Hhh, GamE, GamH, OffP)

Calculate the time derivative of the electron-hole coherence (interband polarization).

Implements the Semiconductor Bloch Equation for the electron-hole coherence p, which represents the microscopic interband polarization that gives rise to the macroscopic optical polarization.

The equation solved is: iℏ dp_{k_e,k_h}/dt =

  • Σ_k’ H_{k_h,k’}^{hh} p_{k’,k_e} [hole Hamiltonian term]

  • Σ_k’ H_{k_e,k’}^{ee} p_{k_h,k’} [electron Hamiltonian term]

  • Σ_k’ H_{k’,k_h}^{eh†} C_{k’,k_e} [electron-electron correlation]

  • Σ_k’ H_{k_e,k’}^{eh} D_{k’,k_h} [hole-hole correlation]

  • H_{k_e,k_h}^{eh} [light-matter coupling]

  • iℏ(γ_e(k_e) + γ_h(k_h)) p_{k_e,k_h} [diagonal dephasing]

  • Γ_p^{off}(k_e,k_h) [off-diagonal dephasing]

Parameters:
  • C (ndarray (complex), shape (Nk, Nk)) – Electron-electron coherence matrix C_{k1,k2}. Diagonal elements C_{k,k} = n_e(k) are electron occupation numbers. Off-diagonal elements represent electron-electron quantum correlations.

  • D (ndarray (complex), shape (Nk, Nk)) – Hole-hole coherence matrix D_{k1,k2}. Diagonal elements D_{k,k} = n_h(k) are hole occupation numbers. Off-diagonal elements represent hole-hole quantum correlations.

  • p (ndarray (complex), shape (Nk, Nk)) – Electron-hole coherence matrix p_{k_e,k_h}. This is the microscopic polarization between electron state k_e and hole state k_h.

  • Heh (ndarray (complex), shape (Nk, Nk)) – Electron-hole Hamiltonian matrix elements H_{k_e,k_h}^{eh}. Contains the light-matter coupling and screened Coulomb attraction.

  • Hee (ndarray (complex), shape (Nk, Nk)) – Electron-electron Hamiltonian matrix elements H_{k1,k2}^{ee}. Contains kinetic energy (diagonal) and Coulomb repulsion (off-diagonal).

  • Hhh (ndarray (complex), shape (Nk, Nk)) – Hole-hole Hamiltonian matrix elements H_{k1,k2}^{hh}. Contains kinetic energy (diagonal) and Coulomb repulsion (off-diagonal).

  • GamE (ndarray (float), shape (Nk,)) – Diagonal electron dephasing rate γ_e(k) for each momentum state (Hz). Due to carrier-carrier and carrier-phonon scattering.

  • GamH (ndarray (float), shape (Nk,)) – Diagonal hole dephasing rate γ_h(k) for each momentum state (Hz). Due to carrier-carrier and carrier-phonon scattering.

  • OffP (ndarray (complex), shape (Nk, Nk)) – Off-diagonal dephasing term Γ_p^{off}(k_e, k_h). Accounts for correlations in scattering processes.

Returns:

dpdt_result – Time derivative dp/dt of the electron-hole coherence (1/s).

Return type:

ndarray (complex), shape (Nk, Nk)

Notes

This is one of the three coupled Semiconductor Bloch Equations (SBEs). The equations for C (electrons) and D (holes) are given by dCdt and dDdt.

The electron-hole coherence p is related to the macroscopic polarization P by: P(r,t) = Σ_{k_e,k_h} d_{cv} p_{k_e,k_h}(t) exp(i(k_e-k_h)·r) where d_{cv} is the interband dipole matrix element.

Physical interpretation: - The Hamiltonian terms (Hee, Hhh) cause phase evolution - The correlation terms (via C, D) include Coulomb many-body effects - The Heh term couples to the external field (light) - Dephasing terms model irreversible decay processes

Uses JIT compilation for performance with automatic fallback to pure Python.

References

V. M. Axt and T. Kuhn, “Femtosecond spectroscopy in semiconductors: a key to coherences, correlations and quantum kinetics”, Rep. Prog. Phys. 67, 433 (2004), Eqs. 2.15-2.19.

See also

dCdt

Time derivative of electron-electron coherence

dDdt

Time derivative of hole-hole coherence

pulsesuite.PSTD3D.SBEs.dCdt(Cee, Dhh, Phe, Heh, Hee, Hhh, GamE, GamH, OffE)

Calculate the time derivative of the electron-electron coherence.

Implements the Semiconductor Bloch Equation for the electron-electron coherence C, which describes the quantum correlations between different electron momentum states. The diagonal elements C_{k,k} = n_e(k) are the electron occupation numbers, while off-diagonal elements represent quantum coherence between different momentum states.

The equation solved is: iℏ dC_{k1,k2}/dt =

  • Σ_k’ H_{k2,k’}^{ee} C_{k1,k’} [k2 electron Hamiltonian]

  • Σ_k’ H_{k’,k1}^{ee} C_{k’,k2} [k1 electron Hamiltonian, commutator]

  • Σ_k’ H_{k2,k’}^{eh} p_{k1,k’}^† [e-h correlation via p†]

  • Σ_k’ H_{k’,k1}^{eh†} p_{k’,k2} [e-h correlation via Heh†]

Note: Off-diagonal dephasing terms (commented out in original Fortran) are not included.

Parameters:
  • Cee (ndarray (complex), shape (Nk, Nk)) – Electron-electron coherence matrix C_{k1,k2}. Diagonal: C_{k,k} = n_e(k) is electron occupation. Off-diagonal: represents electron quantum correlations.

  • Dhh (ndarray (complex), shape (Nk, Nk)) – Hole-hole coherence matrix D_{k1,k2} (not used in this equation, kept for interface compatibility).

  • Phe (ndarray (complex), shape (Nk, Nk)) – Electron-hole coherence matrix p_{k_e,k_h}. Note: Fortran uses Phe for p, but it’s the same as p from dpdt.

  • Heh (ndarray (complex), shape (Nk, Nk)) – Electron-hole Hamiltonian matrix H_{k_e,k_h}^{eh}.

  • Hee (ndarray (complex), shape (Nk, Nk)) – Electron-electron Hamiltonian matrix H_{k1,k2}^{ee}. Diagonal: kinetic energy E_e(k). Off-diagonal: screened Coulomb repulsion between electrons.

  • Hhh (ndarray (complex), shape (Nk, Nk)) – Hole-hole Hamiltonian (not used, kept for interface compatibility).

  • GamE (ndarray (float), shape (Nk,)) – Electron dephasing rates (not used in this equation).

  • GamH (ndarray (float), shape (Nk,)) – Hole dephasing rates (not used, kept for interface compatibility).

  • OffE (ndarray (complex), shape (Nk, Nk)) – Off-diagonal dephasing for electrons (not used in current implementation).

Returns:

dCdt_result – Time derivative dC/dt of electron-electron coherence (1/s).

Return type:

ndarray (complex), shape (Nk, Nk)

Notes

This equation governs the evolution of electron correlations, including: - Single-particle evolution via Hee (phase evolution, energy renormalization) - Coupling to the interband polarization p via Heh - Generation of correlations due to Coulomb interaction

Physical significance: - Diagonal elements: rate of change of electron occupation n_e(k) - Off-diagonal: buildup/decay of electron quantum coherence - Couples to the p equation via Heh, forming a closed system

The off-diagonal dephasing terms involving GamE are commented out in the original Fortran code and not implemented here. If needed, they would add: - iℏ·I_{k1≠k2}·(γ_e(k1) + γ_e(k2))·C_{k1,k2} where I_{k1≠k2} is the anti-identity matrix.

Uses JIT compilation for performance with automatic fallback.

References

    1. Axt and T. Kuhn, Rep. Prog. Phys. 67, 433 (2004), Eqs. 2.15-2.19.

See also

dpdt

Time derivative of electron-hole coherence (interband polarization)

dDdt

Time derivative of hole-hole coherence

pulsesuite.PSTD3D.SBEs.dDdt(Cee, Dhh, Phe, Heh, Hee, Hhh, GamE, GamH, OffH)

Calculate the time derivative of the hole-hole coherence.

Implements the Semiconductor Bloch Equation for the hole-hole coherence D, which describes the quantum correlations between different hole momentum states. The diagonal elements D_{k,k} = n_h(k) are the hole occupation numbers, while off-diagonal elements represent quantum coherence between different momentum states.

The equation solved is: iℏ dD_{k1,k2}/dt =

  • Σ_k’ H_{k2,k’}^{hh} D_{k1,k’} [k2 hole Hamiltonian]

  • Σ_k’ H_{k’,k1}^{hh} D_{k’,k2} [k1 hole Hamiltonian, commutator]

  • Σ_k’ H_{k’,k2}^{eh†} p_{k’,k1}^† [e-h correlation via p†]

  • Σ_k’ H_{k1,k’}^{eh†} p_{k2,k’} [e-h correlation via Heh†]

Note: Off-diagonal dephasing terms (commented out in original Fortran) are not included.

Parameters:
  • Cee (ndarray (complex), shape (Nk, Nk)) – Electron-electron coherence (not used, kept for interface compatibility).

  • Dhh (ndarray (complex), shape (Nk, Nk)) – Hole-hole coherence matrix D_{k1,k2}. Diagonal: D_{k,k} = n_h(k) is hole occupation. Off-diagonal: represents hole quantum correlations.

  • Phe (ndarray (complex), shape (Nk, Nk)) – Electron-hole coherence matrix p_{k_e,k_h}.

  • Heh (ndarray (complex), shape (Nk, Nk)) – Electron-hole Hamiltonian matrix H_{k_e,k_h}^{eh}.

  • Hee (ndarray (complex), shape (Nk, Nk)) – Electron-electron Hamiltonian (not used, kept for interface compatibility).

  • Hhh (ndarray (complex), shape (Nk, Nk)) – Hole-hole Hamiltonian matrix H_{k1,k2}^{hh}. Diagonal: kinetic energy E_h(k). Off-diagonal: screened Coulomb repulsion between holes.

  • GamE (ndarray (float), shape (Nk,)) – Electron dephasing rates (not used, kept for interface compatibility).

  • GamH (ndarray (float), shape (Nk,)) – Hole dephasing rates (not used in this equation).

  • OffH (ndarray (complex), shape (Nk, Nk)) – Off-diagonal dephasing for holes (not used in current implementation).

Returns:

dDdt_result – Time derivative dD/dt of hole-hole coherence (1/s).

Return type:

ndarray (complex), shape (Nk, Nk)

Notes

This equation is analogous to the electron equation (dCdt), but for holes. It governs the evolution of hole correlations, including: - Single-particle evolution via Hhh (phase evolution, energy renormalization) - Coupling to the interband polarization p via Heh - Generation of correlations due to Coulomb interaction

Physical significance: - Diagonal elements: rate of change of hole occupation n_h(k) - Off-diagonal: buildup/decay of hole quantum coherence - Couples to the p equation via Heh, forming a closed system with dpdt and dCdt

The three equations (dpdt, dCdt, dDdt) form the complete set of Semiconductor Bloch Equations that must be solved self-consistently. Together they describe: - Optical response (via p) - Carrier dynamics (via diagonal C and D) - Quantum correlations and many-body effects (via off-diagonal C and D)

The off-diagonal dephasing terms involving GamH are commented out in the original Fortran code and not implemented here. If needed, they would add: - iℏ·I_{k1≠k2}·(γ_h(k1) + γ_h(k2))·D_{k1,k2} where I_{k1≠k2} is the anti-identity matrix.

Uses JIT compilation for performance with automatic fallback.

References

V. M. Axt and T. Kuhn, “Femtosecond spectroscopy in semiconductors”, Rep. Prog. Phys. 67, 433 (2004), Eqs. 2.15-2.19.

See also

dpdt

Time derivative of electron-hole coherence

dCdt

Time derivative of electron-electron coherence

pulsesuite.PSTD3D.SBEs.write_statistics(w, dt, ne2, nh2, Re, Rh)

Write statistical data to file.

Writes detailed carrier statistics including velocities, densities, energies, temperatures, and currents.

Parameters:
  • w (int) – Wire index

  • dt (float) – Time step

  • ne2 (ndarray) – Electron occupation numbers

  • nh2 (ndarray) – Hole occupation numbers

  • Re (ndarray) – Electron charge density

  • Rh (ndarray) – Hole charge density

pulsesuite.PSTD3D.SBEs.CalcMeh(Ex, Ey, Ez, w, Meh)

Calculate the dipole-field coupling matrix for electron-hole transitions.

Computes the matrix elements of the light-matter interaction Hamiltonian M_{k_e,k_h}^{eh} which couples the electric field to the interband polarization. This is the driving term in the optical Bloch equations that causes absorption and emission of photons.

The matrix elements are calculated as: M_{k_e,k_h}^{eh} = -η_{int} [X_{cv}(k_e,k_h)·E_x(q) + Y_{cv}(k_e,k_h)·E_y(q)·y_w(w)

  • Z_{cv}(k_e,k_h)·E_z(q)·(-1)^w]

where: - η_{int} is the electron-hole spatial overlap integral - X_{cv}, Y_{cv}, Z_{cv} are the momentum-dependent dipole matrix elements - q = k_e - k_h is the momentum transfer (photon momentum) - y_w(w) is a wire-dependent weighting factor - (-1)^w alternates sign for different wires

Parameters:
  • Ex (ndarray (complex), shape (Nr,)) – X-component of electric field in momentum space (Fourier transformed). Indexed by momentum q.

  • Ey (ndarray (complex), shape (Nr,)) – Y-component of electric field in momentum space. Multiplied by wire-dependent factor yw(w).

  • Ez (ndarray (complex), shape (Nr,)) – Z-component of electric field in momentum space. Multiplied by (-1)^w for wire parity.

  • w (int) – Wire index. Used to determine y-polarization weight yw(w) and z-polarization sign (-1)^w.

  • Meh (ndarray (complex), shape (Nk, Nk)) – Output matrix for dipole-field coupling (modified in-place).

Returns:

Meh is modified in-place.

Return type:

None

Notes

This function is central to the optical response of the semiconductor. The coupling matrix Meh appears in the SBE for the electron-hole coherence p:

iℏ dp/dt = … + M^{eh}_{k_e,k_h} + …

The momentum index q = k_e - k_h represents the photon momentum absorbed/emitted in a transition. This is obtained via the index mapping array kkp(ke, kh).

The spatial overlap integral η_{int} (ehint) accounts for the finite size of the quantum wire and reduces the coupling strength compared to the bare dipole moment.

The factors yw(w) and (-1)^w allow for different polarization responses in different wires, enabling modeling of wire arrays with varying orientations.

Important: The comment in the Fortran code notes that previously there was confusion about whether to use FFT or IFFT for the fields, and that q should be ke - kh. This has been corrected in the current implementation.

See also

Xcv, Ycv, Zcv

dpdt

The SBE that uses this coupling matrix

pulsesuite.PSTD3D.SBEs.CalcWnn(q0, Vr, Wnn)

Calculate the monopole-potential coupling matrix for carrier-carrier interactions.

Computes the matrix elements of the free-charge potential coupling W_{k1,k2}^{nn} which represents the effect of long-range Coulomb potential from free carriers on the carrier states. This contributes to the longitudinal field effects in the SBEs.

The matrix elements are: W_{k1,k2}^{nn} = q_0 · V_r(q)

where: - q_0 is the charge of the carrier (+e for holes, -e for electrons) - V_r(q) is the electric potential from free charge in momentum space - q = k1 - k2 is the momentum transfer

Parameters:
  • q0 (float) – Free charge of carrier species: +e0 (positive) for holes -e0 (negative) for electrons where e0 is the elementary charge (C)

  • Vr (ndarray (complex), shape (Nr,)) – Electric potential from free charge in momentum space (Fourier transformed). This is the long-range Coulomb potential V(r) = ρ(r)/(4πε_0ε_r) in q-space.

  • Wnn (ndarray (complex), shape (Nk, Nk)) – Output monopole-potential coupling matrix (modified in-place).

Returns:

Wnn is modified in-place.

Return type:

None

Notes

This function calculates the coupling between carriers and the self-consistent mean-field potential arising from the carrier density distribution. It’s used when the longitudinal field (_LF) is enabled to include plasmon effects and long-range Coulomb interactions.

The coupling matrix Wnn would appear in the SBEs as additional diagonal terms: - For electrons: H_{k1,k2}^{ee} += W_{k1,k2}^{ee} (with q0 = -e0) - For holes: H_{k1,k2}^{hh} += W_{k1,k2}^{hh} (with q0 = +e0)

The momentum transfer q = k1 - k2 is obtained via the index mapping kkp(k1, k2).

Note: This function is currently not actively used in the CalcH function (it’s commented out in the Fortran code), but is kept for potential future use or for studying longitudinal field effects.

Important: As noted in the Fortran comments, there was previously confusion about FFT vs IFFT conventions, which has been corrected. The q index now properly represents q = k1 - k2.

See also

CalcMeh

Dipole-field coupling matrix for optical transitions

CalcH

Hamiltonian calculation (where Wnn would be used)

pulsesuite.PSTD3D.SBEs.CalcXqw(iq, w, kr, fe, fh, Ee, Eh, gap, area, game, gamh, dcv)

Calculate the linear optical susceptibility χ(q,ω) for a quantum wire.

Computes the frequency and momentum-dependent linear susceptibility using the Lindhard formula generalized to include population inversion (fe, fh) and dephasing rates (game, gamh). This describes the linear optical response of the quantum wire system to an external electromagnetic field.

The susceptibility includes contributions from both absorption (fc < fv) and stimulated emission (fc > fv) processes at each momentum state.

Physics

The linear susceptibility is calculated as:

χ(q,ω) = Σ_k [N·|d_cv|²/ε₀] × {

(f_c(k) - f_v(k+q)) / [E_v(k+q) - E_c(k) - ℏω - iℏ(γ_h(k+q) + γ_e(k))]

  • (f_v(k) - f_c(k+q)) / [E_c(k+q) - E_v(k) - ℏω - iℏ(γ_e(k+q) + γ_h(k))]

}

where: - N = 2·Δk/(2π·A) is the density of states normalization - d_cv is the interband dipole matrix element - f_c, f_v are electron (conduction) and hole (valence) occupation numbers - E_c, E_v are conduction and valence band energies - γ_e, γ_h are electron and hole dephasing rates - q is the photon momentum (momentum transfer) - ω is the photon frequency

The first term represents transitions where an electron in state k absorbs a photon with momentum q, while the second term represents the time-reversed process (stimulated emission).

param iq:

Momentum index for photon momentum q. Can be positive, negative, or zero. The actual momentum is q = iq * (kr[1] - kr[0]).

type iq:

int

param w:

Angular frequency ω (rad/s) of the electromagnetic field.

type w:

float

param kr:

Momentum grid (rad/m) for carrier states.

type kr:

ndarray (float), shape (Nk,)

param fe:

Electron occupation numbers f_e(k) at each momentum state. Range: [0, 1] for physical occupation.

type fe:

ndarray (float), shape (Nk,)

param fh:

Hole occupation numbers f_h(k) at each momentum state. Range: [0, 1] for physical occupation.

type fh:

ndarray (float), shape (Nk,)

param Ee:

Electron energies E_e(k) relative to conduction band edge (J).

type Ee:

ndarray (float), shape (Nk,)

param Eh:

Hole energies E_h(k) relative to valence band edge (J).

type Eh:

ndarray (float), shape (Nk,)

param gap:

Band gap energy E_g (J).

type gap:

float

param area:

Cross-sectional area A of the quantum wire (m²).

type area:

float

param game:

Electron dephasing rates γ_e(k) (1/s).

type game:

ndarray (float), shape (Nk,)

param gamh:

Hole dephasing rates γ_h(k) (1/s).

type gamh:

ndarray (float), shape (Nk,)

param dcv:

Interband dipole matrix element d_cv (C·m).

type dcv:

complex

returns:

Xqw – Linear optical susceptibility χ(q,ω) (dimensionless). Real part: related to refractive index change Δn. Imaginary part: related to absorption/gain coefficient α.

rtype:

complex

Notes

The summation range is carefully chosen to avoid out-of-bounds array access: - For iq ≥ 0: kmin = 0, kmax = Nk - 1 - iq (Python indexing) - For iq < 0: kmin = -iq, kmax = Nk - 1 (Python indexing)

This ensures that both k and k+iq remain within [0, Nk-1].

The minimum dephasing is set to 1e-4 eV to prevent numerical instabilities from vanishing denominators.

The valence band occupations are f_v = 1 - f_h, as holes represent absence of electrons in the valence band.

The imaginary part Im[χ(q,ω)] > 0 indicates absorption, while Im[χ] < 0 indicates gain (population inversion). The real part Re[χ(q,ω)] is related to dispersion via the Kramers-Kronig relations.

Physical applications: - Optical absorption/gain spectra - Refractive index changes - Electromagnetically induced transparency (EIT) - Population inversion and lasing conditions - Exciton resonances in quantum wires

References

H. Haug and S. W. Koch, “Quantum Theory of the Optical and Electronic Properties of Semiconductors”, 5th ed., World Scientific (2009), Ch. 13.

See also

QWChi1

Related function for calculating χ from coulomb module

RecordXqw

Function that records χ(q,ω) data to files

GetChi1Dqw

1D susceptibility calculation from coulomb module

Examples

>>> # Calculate susceptibility at q=0, near band edge
>>> iq = 0
>>> w = gap / hbar  # Frequency at band gap
>>> chi = CalcXqw(iq, w, kr, fe, fh, Ee, Eh, gap, area, game, gamh, dcv)
>>> alpha = 2 * w / c * np.imag(chi)  # Absorption coefficient
pulsesuite.PSTD3D.SBEs.RecordEpsLqw(Qr, fe, fh, Ee, Eh, gap, area, gamE, gamH, dcv, ind)

Record the longitudinal dielectric function ε_L(q,ω) and susceptibility χ_L(q,ω).

Calculates and saves to file the frequency and momentum-dependent longitudinal dielectric function and linear susceptibility for a quantum wire. This provides a complete characterization of the collective excitations (plasmons) and optical response of the system.

The longitudinal dielectric function describes the screening of longitudinal electric fields (parallel to the wire axis) and determines the dispersion relation of plasmon modes via ε_L(q,ω) = 0.

Parameters:
  • Qr (ndarray (float), shape (Nq,)) – Momentum grid (rad/m) for the output. Determines the q-resolution.

  • fe (ndarray (float), shape (Nk,)) – Electron occupation numbers f_e(k).

  • fh (ndarray (float), shape (Nk,)) – Hole occupation numbers f_h(k).

  • Ee (ndarray (float), shape (Nk,)) – Electron energies E_e(k) (J).

  • Eh (ndarray (float), shape (Nk,)) – Hole energies E_h(k) (J).

  • gap (float) – Band gap energy E_g (J).

  • area (float) – Wire cross-sectional area A (m²).

  • gamE (ndarray (float), shape (Nk,)) – Electron dephasing rates γ_e(k) (1/s).

  • gamH (ndarray (float), shape (Nk,)) – Hole dephasing rates γ_h(k) (1/s).

  • dcv (complex) – Interband dipole matrix element d_cv (C·m).

  • ind (int) – File index for output filename generation.

Returns:

  • None – Data is written to files in ‘dataQW/Wire/Xqw/’ directory.

  • Files Created

  • ————-

  • dataQW/Wire/Xqw/EpsL.{ind (06d}.dat :) – Contains Re[ε_L(q,ω) - 1] and Im[ε_L(q,ω)] in two columns. Data is organized as nested loops: outer loop over ω, inner loop over q. Total size: (nwmax+1) × (Nq+1) rows, 2 columns.

  • dataQW/Wire/Xqw/ChiL.{ind (06d}.dat :) – Contains Re[χ_L(q,ω)] and Im[χ_L(q,ω)] in two columns. Same structure as EpsL file.

  • dataQW/Wire/Xqw/EpsL.params – Parameter file (written only once when _Xqwparams is True). Contains grid information: Nq, Nw, Δω, Δq, frequency range, momentum range.

Notes

The frequency grid is automatically generated: - ω_max = 2·E_g/ℏ (twice the band gap frequency) - Δω = ω_max / 2000 - Number of points: 2001 (from ω=0 to ω_max)

The momentum grid uses the input kr spacing: - Δq = kr[1] - kr[0] - q ranges from 0 to Nk·Δq

The 1D carrier density is calculated as: n_1D = Σ(f_e + f_h) / (2·L) but is currently overridden to a fixed value n_1D = 1.5×10⁸ m⁻¹ for testing.

Two different methods are used: 1. GetEps1Dqw: Analytical RPA dielectric function (from coulomb module) 2. GetChi1Dqw: Numerical susceptibility from actual occupations (from coulomb module)

The longitudinal dielectric function is related to susceptibility by: ε_L(q,ω) = 1 + V(q)·χ_L(q,ω) where V(q) is the 1D Coulomb interaction.

Physical applications: - Plasmon dispersion relations (zeros of ε_L) - Collective oscillation frequencies - Screening length determination - Optical absorption with many-body effects - Carrier density diagnostics

The data format allows easy plotting as 2D contour plots with: - X-axis: momentum q - Y-axis: frequency ω - Color: Re[ε_L] or Im[ε_L]

References

    1. Mahan, “Many-Particle Physics”, 3rd ed., Springer (2000), Ch. 5.

See also

CalcXqw

Calculate linear susceptibility at single (q,ω) point

GetEps1Dqw

Analytical 1D dielectric function (coulomb module)

GetChi1Dqw

Numerical 1D susceptibility (coulomb module)

RecordXqw

Similar function for recording χ(q,ω) using CalcXqw

Examples

>>> # Record dielectric function at time step 1000
>>> RecordEpsLqw(kr, fe, fh, Ee, Eh, gap, area, gamE, gamH, dcv, ind=1000)
>>> # Files created: EpsL.001000.dat, ChiL.001000.dat
pulsesuite.PSTD3D.SBEs.RecordXqw(kr, fe, fh, Ee, Eh, gap, area, game, gamh, dcv, ind)

Record the linear optical susceptibility χ(q,ω) using CalcXqw.

Calculates and saves to file the frequency and momentum-dependent linear susceptibility χ(q,ω) for a quantum wire using the direct CalcXqw function. This provides the complete optical response spectrum including absorption, gain, and dispersion.

Unlike RecordEpsLqw which uses analytical RPA functions, this uses the CalcXqw function that directly sums over carrier occupations, providing a more accurate representation when populations deviate from equilibrium.

Parameters:
  • kr (ndarray (float), shape (Nk,)) – Momentum grid (rad/m) for carrier states.

  • fe (ndarray (float), shape (Nk,)) – Electron occupation numbers f_e(k).

  • fh (ndarray (float), shape (Nk,)) – Hole occupation numbers f_h(k).

  • Ee (ndarray (float), shape (Nk,)) – Electron energies E_e(k) (J).

  • Eh (ndarray (float), shape (Nk,)) – Hole energies E_h(k) (J).

  • gap (float) – Band gap energy E_g (J).

  • area (float) – Wire cross-sectional area A (m²).

  • game (ndarray (float), shape (Nk,)) – Electron dephasing rates γ_e(k) (1/s).

  • gamh (ndarray (float), shape (Nk,)) – Hole dephasing rates γ_h(k) (1/s).

  • dcv (complex) – Interband dipole matrix element d_cv (C·m).

  • ind (int) – File index for output filename generation.

Returns:

  • None – Data is written to files in ‘dataQW/Wire/Xqw/’ directory.

  • Files Created

  • ————-

  • dataQW/Wire/Xqw/Xqw.{ind (06d}.dat :) – Contains three columns: ω (rad/s), Re[χ(q,ω)], Im[χ(q,ω)]. Data is organized as nested loops: outer loop over ω, inner loop over q. Total size: (nwmax+1) × (Nk+1) rows, 3 columns.

  • dataQW/Wire/Xqw/Xqw.params – Parameter file (written only once when _Xqwparams is True). Contains grid information: Nq, Nw, Δω, Δq, frequency range, momentum range.

Notes

The frequency grid is automatically generated: - ω_max = 2·E_g/ℏ (twice the band gap frequency) - Δω = ω_max / 2000 - Number of points: 2001 (from ω=0 to ω_max)

The momentum grid uses indices iq from 0 to Nk: - q ranges from 0 to Nk·Δkr - Δkr = kr[1] - kr[0]

The output format with three columns (ω, Re[χ], Im[χ]) facilitates plotting and analysis of the frequency-dependent response at each momentum.

Computation time scales as O(Nω × Nq × Nk), which can be substantial for large grids. For Nω=2001, Nq=101, Nk=101, this requires ~20M function calls to CalcXqw.

Physical applications: - Optical absorption/gain spectra vs. carrier density - Refractive index changes (via Kramers-Kronig) - Identification of excitonic resonances - Population inversion and lasing thresholds - Non-equilibrium optical response

The inclusion of ω in the first column makes it easy to plot susceptibility vs. frequency for any given q value.

Differences from RecordEpsLqw: - Uses CalcXqw (direct sum over occupations) vs. GetChi1Dqw (equilibrium) - Output format: 3 columns (ω, Re, Im) vs. 2 columns (Re, Im) - Single file vs. separate files for ε and χ

See also

CalcXqw

Function used to calculate χ(q,ω)

RecordEpsLqw

Similar function using analytical RPA methods

QWChi1

Related susceptibility calculation from qwoptics module

Examples

>>> # Record susceptibility after excitation at time step 1000
>>> RecordXqw(kr, fe, fh, Ee, Eh, gap, area, game, gamh, dcv, ind=1000)
>>> # File created: Xqw.001000.dat
pulsesuite.PSTD3D.SBEs.GetArrays(x, qx, kx)

Initialize spatial and momentum arrays for the SBE solver.

Sets up the fundamental coordinate and momentum space grids used throughout the semiconductor Bloch equation calculations. This includes: - Real-space positions x for field propagation - Momentum space qx for Fourier-transformed fields - Carrier momentum grid kx (offset by half grid spacing)

The carrier momentum grid kx is offset by 0.5 grid spacing to avoid having a state exactly at k=0, which simplifies boundary conditions and symmetry.

Parameters:
  • x (ndarray (float), shape (Nr,)) – Real-space position array (m). Modified in-place.

  • qx (ndarray (float), shape (Nr,)) – Momentum array for fields (rad/m). Modified in-place.

  • kx (ndarray (float), shape (Nk,)) – Carrier momentum array (rad/m). Modified in-place.

Returns:

Arrays x, qx, kx are modified in-place. Module-level variables _NK0 and _NQ0 are set.

Return type:

None

Notes

The carrier momentum grid kx is centered at k=0 with the formula: kx[k] = Δkr × (-dnk + k - 0.5) for k = 0, 1, …, Nk-1

where dnk = (Nk-1)/2, so that: - kx is antisymmetric about the origin - The grid spacing is Δkr - No state sits exactly at k=0 (offset by 0.5)

The field momentum array qx is obtained from GetKArray and then: 1. Shifted by cshift(qx, Nr/2) to center the zero-frequency component 2. The first element is negated: qx[0] = -qx[0]

Module-level variables set: - _NK0: Index where kx ≈ 0 (central carrier momentum index) - _NQ0: Index where qx = 0 (zero field momentum index)

These zero indices are crucial for the kkp mapping array and for properly handling momentum conservation in scattering processes.

The real-space array x spans the domain [-L, L] (total length 2L). The momentum array qx corresponds to this spatial grid via FFT convention.

See also

GetSpaceArray

Generate real-space position array (from usefulsubs)

GetKArray

Generate momentum array for FFT (from usefulsubs)

GetArray0Index

Find index where array value is closest to zero (from usefulsubs)

MakeKKP

Create momentum difference mapping using NQ0

Examples

>>> x = np.zeros(Nr)
>>> qx = np.zeros(Nr)
>>> kx = np.zeros(Nk)
>>> GetArrays(x, qx, kx)
>>> # Now x, qx, kx are initialized and _NK0, _NQ0 are set
pulsesuite.PSTD3D.SBEs.MakeKKP()

Create the momentum difference mapping array kkp.

Constructs the index mapping array kkp[k, kp] that gives the field momentum index for the momentum difference q = k - kp. This is essential for evaluating matrix elements of Fourier-transformed fields in the semiconductor Bloch equations.

The array satisfies: qx[kkp[k, kp]] ≈ kr[k] - kr[kp]

where qx is the field momentum array and kr is the carrier momentum array.

Returns:

The module-level array _kkp is allocated and filled.

Return type:

None

Notes

The mapping is calculated as: kkp[k, kp] = round[(kr[k] - kr[kp]) / Δkr] + NQ0

where: - kr[k] - kr[kp] is the momentum difference - Division by Δkr converts to grid index units - round() maps to nearest grid point - NQ0 is added to shift from centered indexing to array indexing

This mapping is used extensively in the SBE Hamiltonian terms: - Dipole-field coupling: M_{k_e,k_h} ∝ E(q) where q = k_e - k_h - Coulomb interaction: V_{k1,k2} ∝ V(q) where q = k1 - k2 - Screening: ε(q) where q is momentum transfer

Physical interpretation: When an electron scatters from state kp to state k, the momentum transfer is q = k - kp. This momentum must be provided by (or absorbed into) a photon, phonon, or other field mode. The kkp array provides the field mode index corresponding to this momentum transfer.

Memory: For Nk=101, kkp requires ~10,000 integers (~40 KB).

The Fortran code includes commented-out bounds checking: - if(kr[0] <= q <= kr[Nr]): only map if q is in range - if(kkp < 1 or kkp > Nr): set kkp = 0 for out-of-range

These checks are omitted in the current implementation, assuming that the momentum grids are compatible and all differences are in range.

Global Variables Modified

_kkpndarray (int), shape (Nk, Nk)

Momentum difference mapping array. Allocated and filled.

See also

GetArrays

Must be called first to set _NQ0

CalcMeh

Uses kkp for dipole-field coupling

CalcWnn

Uses kkp for potential coupling

kindex

Convert continuous momentum to grid index

Examples

>>> GetArrays(x, qx, kx)  # Initialize arrays first
>>> MakeKKP()  # Now create mapping
>>> # Access field at momentum difference k - kp:
>>> q_idx = _kkp[k, kp]
>>> field_at_q = Ex[q_idx]
pulsesuite.PSTD3D.SBEs.kindex(k)

Convert a continuous momentum value to the nearest grid index.

Maps a continuous momentum k (in rad/m) to the corresponding index in the carrier momentum array kr. Useful for finding which discrete momentum state corresponds to a given continuous momentum value.

Parameters:

k (float) – Momentum value (rad/m).

Returns:

idx – Index in the kr array closest to the given momentum k.

Return type:

int

Notes

The mapping formula is: idx = round(k / Δkr) + NK0

where: - k / Δkr converts momentum to grid index units - round() finds nearest grid point - NK0 is added to shift from centered indexing to array indexing

This function is the inverse of: k ≈ (idx - NK0) × Δkr

Caution: No bounds checking is performed. If k is outside the range of the kr array, the returned index may be out of bounds [0, Nk-1].

Physical applications: - Finding initial state indices for given carrier momenta - Mapping continuous momentum distributions to discrete grid - Identifying states near a specific momentum (e.g., Fermi surface)

See also

GetArrays

Sets up kr array and NK0

MakeKKP

Creates momentum difference mapping

Examples

>>> # Find index for momentum near Fermi momentum
>>> k_fermi = 1e8  # rad/m
>>> idx = kindex(k_fermi)
>>> k_actual = _kr[idx]  # Actual momentum on grid
pulsesuite.PSTD3D.SBEs.InitializeSBE(q, rr, r0, Emaxxx, lam, Nw, QW)

Initialize the SBE module for calculations.

This function allocates all module-level arrays, initializes them to zero, calculates material constants, and sets up all subsystems required for solving the Semiconductor Bloch Equations. It must be called before any SBE calculations are performed.

The initialization process includes: 1. Reading physical parameters from parameter files 2. Calculating momentum and spatial grids 3. Allocating coherence matrices (YY, CC, DD) for all wires 4. Computing material constants (dipole moment, screening lengths, etc.) 5. Initializing subsystems (Coulomb, Phonons, DC field, Dephasing, Emission) 6. Setting up output files 7. Calculating initial carrier distributions

Parameters:
  • q (ndarray (float), shape (Nq,)) – Momentum array for fields (rad/m). Used for compatibility but not directly modified in this function.

  • rr (ndarray (float), shape (Nr_prop,)) – Spatial position array for propagation space (m). Used to determine the quantum wire window within the propagation domain.

  • r0 (float) – Reference position offset (m). Used to locate the quantum wire within the propagation spatial grid.

  • Emaxxx (float) – Initial peak electric field magnitude (V/m). Used to determine when to activate quantum wire calculations (via _wireoff flag).

  • lam (float) – Laser wavelength (m). Used for calculating linear susceptibility and initializing QW optics.

  • Nw (int) – Number of quantum wires in the simulation. Each wire has its own set of coherence matrices (YY, CC, DD).

  • QW (bool) – Flag to enable quantum wire calculations. If False, only minimal initialization is performed.

Returns:

All module-level arrays and variables are set.

Return type:

None

Notes

The function performs extensive setup:

Grid Calculation: - Maximum momentum: kmax = sqrt(1.2 * gap * 2 * me / hbar²) - Momentum spacing: dkr = 2π / (2*L) - Number of k-points: Nk = floor(kmax/dkr) * 2 + 1, then Nk = Nk - 1 - Number of r-points: Nr = Nk * 2

Material Constants: - Dipole moment: dcv = sqrt((e0*hbar)² / (6*me0*gap) * (me0/me - 1)) - Electron confinement: alphae = sqrt(me * HO) / hbar - Hole confinement: alphah = sqrt(mh * HO) / hbar - Overlap integral: ehint = sqrt(2 * alphae * alphah / (alphae² + alphah²)) - Critical momentum: qc = 2 * alphae * alphah / (alphae + alphah) - Wire area: area = sqrt(2π) / sqrt(alphae² + alphah²) * Delta0

Initial Carrier Distribution: - Electrons and holes initialized to Fermi-Dirac distribution at

energy E = gap/2 (half the band gap)

  • All off-diagonal coherence elements set to zero

Subsystem Initialization: - InitializeQWOptics: Sets up optical coupling matrices - InitializeCoulomb: Calculates screened Coulomb interactions - InitializePhonons: Sets up phonon scattering rates - InitializeDC: Prepares DC field transport calculations - InitializeDephasing: Sets up dephasing rate calculations - InitializeEmission: (if _Recomb=True) Sets up spontaneous emission

Output Files: For each wire w: - dataQW/info.{w:02d}.t.dat - General information - dataQW/EP.{w:02d}.t.dat - Energy and polarization data - dataQW/XQ.{w:02d}.t.dat - Susceptibility data - dataQW/Etr.dat - Transition energies - dataQW/Wire/info/ETHz.t.dat - THz field data

Special Modes: If _OBE=True (Optical Bloch Equations only): - Disables all many-body effects - Only optical coupling remains active - Useful for testing basic optical response

File I/O: - Reads parameters from ‘params/qw.params’ and ‘params/mb.params’ - Optionally reads DC field from ‘DC.txt’ if _ReadDC=True - Writes initial arrays using WriteIt function

The function sets the module-level flag _start to indicate that initialization is complete, allowing other functions to check if the module has been properly initialized.

See also

ReadQWParams

Read quantum wire physical parameters

ReadMBParams

Read many-body physics flags

GetArrays

Set up spatial and momentum grids

MakeKKP

Create momentum difference mapping

InitializeQWOptics

Initialize optical coupling

InitializeCoulomb

Initialize Coulomb interactions

InitializePhonons

Initialize phonon scattering

InitializeDC

Initialize DC field transport

InitializeDephasing

Initialize dephasing rates

InitializeEmission

Initialize spontaneous emission

QWChi1

Calculate linear susceptibility

RecordXqw

Record susceptibility data

Examples

>>> import numpy as np
>>> q = np.linspace(-1e8, 1e8, 201)
>>> rr = np.linspace(-500e-9, 500e-9, 201)
>>> InitializeSBE(q, rr, r0=0.0, Emaxxx=1e6, lam=800e-9, Nw=1, QW=True)
>>> # Module is now initialized and ready for SBE calculations
pulsesuite.PSTD3D.SBEs.SBECalculator(Ex, Ey, Ez, Vr, dt, Px, Py, Pz, Re, Rh, WriteFields, w)

Solve the 1D Semiconductor Bloch Equations and calculate source terms.

This is the main function that solves the Semiconductor Bloch Equations for the w’th quantum wire and calculates the source terms Px, Py, Pz, Re, and Rh that are used in Maxwell’s equations for field propagation.

The function performs a leapfrog time integration of the SBEs, including: - Electron-hole coherence (interband polarization) p - Electron-electron coherence C - Hole-hole coherence D - Many-body effects (Coulomb, phonons, dephasing) - DC transport effects - Charge density calculations

Parameters:
  • Ex (ndarray (complex), shape (Nr,)) – X-component electric field in QW momentum space (modified in-place). The field is FFT’d to real space for calculations, then FFT’d back.

  • Ey (ndarray (complex), shape (Nr,)) – Y-component electric field in QW momentum space (modified in-place).

  • Ez (ndarray (complex), shape (Nr,)) – Z-component electric field in QW momentum space (modified in-place).

  • Vr (ndarray (complex), shape (Nr,)) – Free charge potential (voltage) in QW momentum space (modified in-place).

  • dt (float) – Time step (s).

  • Px (ndarray (complex), shape (Nr,)) – X-component QW polarization field (output, modified in-place).

  • Py (ndarray (complex), shape (Nr,)) – Y-component QW polarization field (output, modified in-place).

  • Pz (ndarray (complex), shape (Nr,)) – Z-component QW polarization field (output, modified in-place).

  • Re (ndarray (complex), shape (Nr,)) – QW electron charge density (output, modified in-place).

  • Rh (ndarray (complex), shape (Nr,)) – QW hole charge density (output, modified in-place).

  • WriteFields (bool) – Flag to record SBE solutions and write output files this time step.

  • w (int) – Quantum wire index (which wire to calculate for).

Returns:

All output arrays (Px, Py, Pz, Re, Rh, Ex, Ey, Ez, Vr) are modified in-place.

Return type:

None

Notes

The function implements the following sequence:

  1. Initialize source terms to zero

  2. Checkout coherence matrices from module storage for wire w

  3. Prepare arrays (Hamiltonians, screening, dephasing) via Preparation()

  4. Calculate time derivatives dp/dt, dC/dt, dD/dt

  5. Time evolve using leapfrog scheme: X3 = X1 + dX/dt * 2*dt

  6. Apply relaxation (phonon/carrier-carrier scattering) if enabled

  7. Apply DC transport if enabled

  8. Normalize populations to ensure charge neutrality

  9. Reshuffle for stability (convert leapfrog to implicit Euler)

  10. Calculate polarization Px, Py, Pz from coherence p

  11. Calculate charge densities Re, Rh if longitudinal field enabled

  12. Write output files if WriteFields is True

  13. Checkin updated matrices to module storage

Time Integration Scheme: The leapfrog scheme is: - X3 = X1 + dX/dt * 2*dt (2nd order accurate but potentially unstable) - Then reshuffled to: X2 = (X1 + X3) / 2 (1st order accurate but stable)

This converts the 2nd-order accurate (but unstable) leapfrog scheme into a 1st-order accurate (but stable) implicit Euler scheme.

Charge Neutrality: The populations are normalized so that: - Total electrons = Total holes = (sum(ne) + sum(nh)) / 2 This ensures charge neutrality in the system.

FFT Operations: The electric fields and polarizations are FFT’d to real space for calculations, then FFT’d back to momentum space. This is done because: - Some calculations are easier in real space - The output is written in real space (at center point Nr/2)

Output Files: If WriteFields is True: - WriteSBESolns: Writes coherence matrices and populations - WriteDephasing: Writes dephasing rates (if DiagDph enabled) - File (uw+w): Writes statistics (velocities, densities, energies, etc.) - File (2*uw+w): Writes fields and polarizations at center point

Module Variables Used: - _YY1, _YY2, _YY3: Electron-hole coherence matrices - _CC1, _CC2, _CC3: Electron-electron coherence matrices - _DD1, _DD2, _DD3: Hole-hole coherence matrices - _Id, _Ia: Identity and anti-identity matrices - _kr, _Ee, _Eh: Momentum and energy arrays - _r, _Qr: Spatial and momentum arrays - _I0: Drift current array - _xxx, _jjj: Time step counters - _gap, _me, _mh, _L, _area, _ehint: Material parameters - _Optics, _EHs, _Phonon, _DCTrans, _LF, _DiagDph: Physics flags

See also

Preparation

Prepare Hamiltonians and arrays for SBE time step

dpdt

Calculate time derivative of electron-hole coherence

dCdt

Calculate time derivative of electron-electron coherence

dDdt

Calculate time derivative of hole-hole coherence

Relaxation

Apply phonon and carrier-carrier scattering

Transport

Apply DC field transport effects

QWPolarization3

Calculate polarization from coherence

QWRho5

Calculate charge densities from coherence

Checkout

Retrieve coherence matrices from module storage

Checkin

Store coherence matrices to module storage

class pulsesuite.PSTD3D.SBEs.SBESolver(q, rr, r0, Emaxxx, lam, Nw, QW, backend='auto')

Class-based SBE solver. Encapsulates all module-level state as instance attributes, enabling multiple independent quantum wire simulations.

L = 1e-07
Delta0 = 5e-09
gap = 2.4032649509999997e-19
me
mh
HO = 1.602176634e-20
gam_e = 1000000000000.0
gam_h = 1000000000000.0
gam_eh = 1000000000000.0
wL = 0.0
epsr = 9.1
Oph
Gph
Edc = 0.0
Optics = True
Excitons = True
EHs = True
Screened = True
Phonon = True
DCTrans = False
LF = True
FreePot = False
DiagDph = True
OffDiagDph = True
OBE = False
Recomb = False
ReadDC = False
PLSpec = False
ignorewire = False
debug1 = False
Xqwparams = False
Id = None
Ia = None
Ee = None
Eh = None
r = None
Qr = None
QE = None
kr = None
EPEnergy = 0.0
EPEnergyW = 0.0
I0 = None
ErI0 = None
hw
PLS
dkr = 0.0
dr = 0.0
Nr1 = 0
Nr2 = 0
start = False
qw = None
Nr = 0
Nk = 0
small = 1e-200
NK0 = 0
NQ0 = 0
nqq = 0
nqq10 = 0
kkp = None
dcv = None
ehint = 1.0
Emax0 = 0.0
alphae = 0.0
alphah = 0.0
qc = 0.0
area = 1e-16
t = 0.0
wph = 0.0
chiw = 0j
uw = 820
vhh0 = 0.0
ETHz = 0.0
wireoff = True
xxx = 1
jjj = 1
jmax = 1000
ntmax = 100000
file_972 = None
file_973 = None
Nw
YY1
YY2
YY3
CC1
CC2
CC3
DD1
DD2
DD3
kindex(k)

Convert continuous momentum to nearest grid index.

calc_Xqw(iq, w, kr, fe, fh, Ee, Eh, gap, area, game, gamh, dcv)

Calculate linear optical susceptibility chi(q,w).

chiqw()

Return linear optical susceptibility.

getqc()

Return critical momentum.

QWArea()

Return quantum wire cross-sectional area.

ShutOffOptics()

Disable optical coupling.

write_sbes_data(n)

Write coherence matrices to backup files.

read_sbes_data(Nt)

Read coherence matrices from backup files.

QWCalculator(Exx, Eyy, Ezz, Vrr, rr, q, dt, w, Pxx, Pyy, Pzz, Rho, DoQWP, DoQWDl)

Time-evolve quantum wire sources for Maxwell’s equations.

close()

Close open file handles.

__del__()
pulsesuite.PSTD3D.SBEs.InitializeSBE(q, rr, r0, Emaxxx, lam, Nw, QW)

Backward-compatible shim — creates a default SBESolver instance.

pulsesuite.PSTD3D.SBEs.QWCalculator(Exx, Eyy, Ezz, Vrr, rr, q, dt, w, Pxx, Pyy, Pzz, Rho, DoQWP, DoQWDl)

Backward-compatible shim — delegates to _default_solver.

pulsesuite.PSTD3D.SBEs.chiqw()

Backward-compatible shim.

pulsesuite.PSTD3D.SBEs.getqc()

Backward-compatible shim.

pulsesuite.PSTD3D.SBEs.QWArea()

Backward-compatible shim.

pulsesuite.PSTD3D.SBEs.ShutOffOptics()

Backward-compatible shim.

pulsesuite.PSTD3D.SBEs.WriteSBEsData(n)

Backward-compatible shim.

pulsesuite.PSTD3D.SBEs.ReadSBEsData(Nt)

Backward-compatible shim.