pulsesuite.PSTD3D.qwoptics¶
Quantum wire optics calculations for quantum wire simulations.
This module converts Maxwell electric fields from propagation space to quantum wire (QW) electric fields, and vice versa. It also calculates QW polarization and charge densities.
State is encapsulated in the QWOptics class (one instance per
quantum wire configuration). JIT/CUDA kernels and stateless helper
functions remain at module level.
Author: Rahul R. Sah
Attributes¶
Classes¶
Quantum wire optics state and calculations. |
Functions¶
|
Calculate wire-dependent sign factor. |
|
Calculate quantum wire linear susceptibility. |
|
Calculate interaction matrices Vcc, Vvv, Vcv, Vvc. |
|
Print real part of complex field to file. |
|
Print real part of complex field to file. |
|
Print 3D complex array to file. |
|
Write SBE solutions to files. |
|
Write photoluminescence spectrum to file. |
|
Write QW field arrays to files. |
|
Write propagation field arrays to files. |
Module Contents¶
- pulsesuite.PSTD3D.qwoptics.twopi¶
- pulsesuite.PSTD3D.qwoptics.c0¶
- pulsesuite.PSTD3D.qwoptics.hbar¶
- pulsesuite.PSTD3D.qwoptics.eps0¶
- pulsesuite.PSTD3D.qwoptics.ii = 1j¶
- class pulsesuite.PSTD3D.qwoptics.QWOptics(RR, L, dcv, kr, Qr, Ee, Eh, ehint, area, gap)¶
Quantum wire optics state and calculations.
Wraps the Fortran-module state variables (_QWWindow, _Expikr, dipole matrices, etc.) into one object. Method names are identical to the original Fortran / flat-Python API so that callers stay familiar.
Parameters are the same as the old
InitializeQWOpticsfunction.- CalcQWWindow(YY, L)¶
Calculate quantum wire window function.
- Parameters:
YY (ndarray) – Spatial coordinate array, 1D array
L (float) – Length of wire (m)
- CalcExpikr(y, ky)¶
Compute exp(i k r) phase arrays.
- Parameters:
y (ndarray) – Spatial coordinate array, 1D array
ky (ndarray) – Momentum coordinate array, 1D array
- Prop2QW(RR, Exx, Eyy, Ezz, Vrr, Edc, R, Ex, Ey, Ez, Vr, t, xxx)¶
Convert Maxwell electric fields from propagation space to QW space.
- Parameters:
RR (ndarray) – Maxwell spatial array, 1D
Exx (ndarray) – Maxwell electric field components, 1D, complex
Eyy (ndarray) – Maxwell electric field components, 1D, complex
Ezz (ndarray) – Maxwell electric field components, 1D, complex
Vrr (ndarray) – Maxwell free charge potential, 1D, complex
Edc (float) – DC field (currently unused)
R (ndarray) – QW spatial array, 1D
Ex (ndarray) – QW electric field components (modified in-place), 1D, complex
Ey (ndarray) – QW electric field components (modified in-place), 1D, complex
Ez (ndarray) – QW electric field components (modified in-place), 1D, complex
Vr (ndarray) – QW free charge potential (modified in-place), 1D, complex
t (float) – Current time (s)
xxx (int) – Time index
- QW2Prop(r, Qr, Ex, Ey, Ez, Vr, Px, Py, Pz, re, rh, RR, Pxx, Pyy, Pzz, RhoE, RhoH, w, xxx, WriteFields, Plasmonics)¶
Convert QW fields and polarizations back to propagation space.
- Parameters:
r (ndarray) – QW Y-space, 1D
Qr (ndarray) – QW momentum space, 1D
Ex (ndarray) – QW electric field components (modified in-place), 1D, complex
Ey (ndarray) – QW electric field components (modified in-place), 1D, complex
Ez (ndarray) – QW electric field components (modified in-place), 1D, complex
Vr (ndarray) – QW free charge potential (modified in-place), 1D, complex
Px (ndarray) – QW polarization components (modified in-place), 1D, complex
Py (ndarray) – QW polarization components (modified in-place), 1D, complex
Pz (ndarray) – QW polarization components (modified in-place), 1D, complex
re (ndarray) – QW electron/hole charge density (modified in-place), 1D, complex
rh (ndarray) – QW electron/hole charge density (modified in-place), 1D, complex
RR (ndarray) – Propagation Y-space, 1D
Pxx (ndarray) – Propagation polarizations (modified in-place), 1D, complex
Pyy (ndarray) – Propagation polarizations (modified in-place), 1D, complex
Pzz (ndarray) – Propagation polarizations (modified in-place), 1D, complex
RhoE (ndarray) – Propagation charge densities (modified in-place), 1D, complex
RhoH (ndarray) – Propagation charge densities (modified in-place), 1D, complex
w (int) – Wire index
xxx (int) – Time index
WriteFields (bool) – Record fields?
Plasmonics (bool) – Calculate charge densities?
- QWPolarization3(y, ky, p, ehint, area, L, Px, Py, Pz, xxx, w)¶
Calculate QW polarization in 3D.
- Parameters:
y (ndarray) – Spatial coordinate array, 1D
ky (ndarray) – Momentum coordinate array, 1D
p (ndarray) – Density matrix, shape (Nk, Nk), complex
ehint (float) – Electron-hole space integral
area (float) – Area of wire (m^2)
L (float) – Length of wire (m)
Px (ndarray) – QW polarization components (modified in-place), 1D, complex
Py (ndarray) – QW polarization components (modified in-place), 1D, complex
Pz (ndarray) – QW polarization components (modified in-place), 1D, complex
xxx (int) – Time index
w (int) – Wire index
- QWRho5(Qr, kr, R, L, kkp, p, CC, DD, ne, nh, re, rh, xxx, jjj)¶
Calculate quantum wire charge densities.
- Parameters:
Qr (ndarray) – QW momentum array, 1D
kr (ndarray) – QW momentum array, 1D
R (ndarray) – QW spatial coordinate array, 1D
L (float) – Length of wire (m)
kkp (ndarray) – Momentum difference index matrix, 2D, integer
p (ndarray) – Density matrix (unused, interface compat), 2D, complex
CC (ndarray) – Electron/electron coherence matrix, 2D, complex
DD (ndarray) – Hole/hole coherence matrix, 2D, complex
ne (ndarray) – Electron occupation numbers, 1D, complex
nh (ndarray) – Hole occupation numbers, 1D, complex
re (ndarray) – Electron charge density (modified in-place), 1D, complex
rh (ndarray) – Hole charge density (modified in-place), 1D, complex
xxx (int) – Time index
jjj (int) – Additional index (unused, interface compat)
- Xcv(k, kp)¶
Get X dipole matrix element at indices (k, kp).
- Ycv(k, kp)¶
Get Y dipole matrix element at indices (k, kp).
- Zcv(k, kp)¶
Get Z dipole matrix element at indices (k, kp).
- pulsesuite.PSTD3D.qwoptics.yw(w)¶
Calculate wire-dependent sign factor.
- pulsesuite.PSTD3D.qwoptics.QWChi1(lam, dky, Ee, Eh, area, geh, dcv)¶
Calculate quantum wire linear susceptibility.
- Parameters:
- Returns:
Linear susceptibility chi^(1)
- Return type:
- pulsesuite.PSTD3D.qwoptics.GetVn1n2(kr, rcv, Hcc, Hhh, Hcv, Vcc, Vvv, Vcv, Vvc)¶
Calculate interaction matrices Vcc, Vvv, Vcv, Vvc.
- Parameters:
kr (ndarray) – Momentum coordinate array, 1D
rcv (ndarray) – Conduction-valence dipole moment array, 1D, complex
Hcc (ndarray) – Conduction-conduction Hamiltonian matrix, 2D, complex
Hhh (ndarray) – Hole-hole Hamiltonian matrix, 2D, complex
Hcv (ndarray) – Conduction-valence Hamiltonian matrix, 2D, complex
Vcc (ndarray) – Interaction matrices (modified in-place), 2D, complex
Vvv (ndarray) – Interaction matrices (modified in-place), 2D, complex
Vcv (ndarray) – Interaction matrices (modified in-place), 2D, complex
Vvc (ndarray) – Interaction matrices (modified in-place), 2D, complex
- pulsesuite.PSTD3D.qwoptics.printITReal2(Dx, z, n, file)¶
Print real part of complex field to file.
- pulsesuite.PSTD3D.qwoptics.printITReal(Dx, z, n, file)¶
Print real part of complex field to file.
- pulsesuite.PSTD3D.qwoptics.printIT3D(Dx, z, n, file)¶
Print 3D complex array to file.
- pulsesuite.PSTD3D.qwoptics.WriteSBESolns(ky, ne, nh, C, D, P, Ee, Eh, w, xxx)¶
Write SBE solutions to files.
- Parameters:
ky (ndarray) – QW momentum array, 1D
ne (ndarray) – Electron/hole occupation numbers, 1D, complex
nh (ndarray) – Electron/hole occupation numbers, 1D, complex
C (ndarray) – Coherence matrices, 2D, complex
D (ndarray) – Coherence matrices, 2D, complex
P (ndarray) – Coherence matrices, 2D, complex
Ee (ndarray) – Electron/hole energies, 1D, complex
Eh (ndarray) – Electron/hole energies, 1D, complex
w (int) – Wire index
xxx (int) – Time index
- pulsesuite.PSTD3D.qwoptics.WritePLSpectrum(hw, PLS, w, xxx)¶
Write photoluminescence spectrum to file.
- pulsesuite.PSTD3D.qwoptics.WriteQWFields(QY, Ex, Ey, Ez, Vr, Px, Py, Pz, Re, Rh, sp, w, xxx)¶
Write QW field arrays to files.
- Parameters:
QY (ndarray) – QY momentum/y-space array, 1D
Ex (ndarray) – QW electric fields, 1D, complex
Ey (ndarray) – QW electric fields, 1D, complex
Ez (ndarray) – QW electric fields, 1D, complex
Vr (ndarray) – QW free charge potential, 1D, complex
Px (ndarray) – QW polarizations, 1D, complex
Py (ndarray) – QW polarizations, 1D, complex
Pz (ndarray) – QW polarizations, 1D, complex
Re (ndarray) – QW charge densities, 1D, complex
Rh (ndarray) – QW charge densities, 1D, complex
sp (str) – Domain label (‘k’ or ‘r’)
w (int) – Wire index
xxx (int) – Time index
- pulsesuite.PSTD3D.qwoptics.WritePropFields(y, Ex, Ey, Ez, Vr, Px, Py, Pz, Re, Rh, sp, w, xxx)¶
Write propagation field arrays to files.
- Parameters:
y (ndarray) – Spatial coordinate array, 1D
Ex (ndarray) – Propagation electric fields, 1D, complex
Ey (ndarray) – Propagation electric fields, 1D, complex
Ez (ndarray) – Propagation electric fields, 1D, complex
Vr (ndarray) – Propagation free charge potential, 1D, complex
Px (ndarray) – Propagation polarizations, 1D, complex
Py (ndarray) – Propagation polarizations, 1D, complex
Pz (ndarray) – Propagation polarizations, 1D, complex
Re (ndarray) – Propagation charge densities, 1D, complex
Rh (ndarray) – Propagation charge densities, 1D, complex
sp (str) – Space label
w (int) – Wire index
xxx (int) – Time index