API reference#
hhgsfa.sfa#
Strong-field approximation (SFA) dipole, its spectrum and its harmonics.
Lewenstein et al., Phys. Rev. A 49, 2117 (1994).
- hhgsfa.sfa.dipole(t, E, gas, wavelength, first_return=True, eps=0.0)#
SFA dipole of an atom driven by a linearly polarized field.
Runs in parallel with numba when installed (hhgsfa[numba]).
- Parameters:
- tndarray
Uniform time grid [s].
- Endarray
Real driving field Re{E} on t [V/m].
- gas{“He”, “Ne”, “Ar”, “Kr”, “Xe”}
Target gas, sets the ionization potential.
- wavelengthfloat
Central wavelength of the driver [m].
- first_returnbool, default True
Keep only the short and long paths of the first return (excursions up to one cycle).
- epsfloat, default 0
Regularization ε [a.u.] of the momentum integral, (π/(ε + iτ/2))^(3/2). It can stay 0 since τ ≥ dt.
- Returns:
- ndarray
Dipole D(t) [a.u.].
- Raises:
- ValueError
If t is not uniform.
- Warns:
- UserWarning
If t is too coarse to resolve the cutoff Ip + 3.17 Up.
- hhgsfa.sfa.dipole_spectrum(t, D)#
Spectrum of a dipole, S(ω) = (2π)^(−1/2)·∫D(t)·exp(iωt)·dt, by FFT.
The unitary angular Fourier transform with the time origin of t, as harmonic at every FFT frequency.
- Parameters:
- tndarray
Uniform time grid [s].
- Dndarray
Dipole on t.
- Returns:
- eVndarray
Photon energy [eV].
- Sndarray
Complex spectrum.
- hhgsfa.sfa.harmonic(t, D, q, wavelength)#
Complex harmonic q of a dipole, its Fourier transform (2π)^(−1/2)·∫D(t)·exp(iqωt)·dt exactly at qω.
For the dipole of any pulse, from dipole. It is the amplitude of the exp(−iqωt) component, the time convention of analytic, evaluated at qω rather than read between the bins of dipole_spectrum. It integrates over the whole of t, so it grows with the pulse duration. For the steady harmonic at a fixed intensity, per period, use harmonic_dipole.
- Parameters:
- tndarray
Uniform time grid [s].
- Dndarray
Dipole on t, along the last axis (several dipoles can be stacked).
- qint or array_like
Harmonic order(s).
- wavelengthfloat
Central wavelength of the driver [m].
- Returns:
- complex or ndarray
Amplitude of each dipole at each harmonic, shape D.shape[:-1] + q.shape.
- Raises:
- ValueError
If qω is above the Nyquist frequency of t.
- hhgsfa.sfa.harmonic_dipole(I, q, gas, wavelength, first_return=True, ramp=2, flat=None, last=1, points_per_cycle=None)#
Steady harmonic dipole d_q(I), the Fourier coefficient of the SFA dipole in a constant field.
Unlike harmonic, which takes a dipole already computed, it builds the field itself and runs dipole at each intensity, so d_q(I) is the single-atom response at that intensity, the quantity of analytic.harmonic_dipole.
The field rises with a sin² ramp, stays constant for flat cycles, and d_q = (1/T)·∫D(t)·exp(iqωt)·dt over the last last cycles, a whole number of periods of the steady response, so the coefficient is exact without a window.
- Parameters:
- Iarray_like
Intensity [W/m²].
- qint or array_like
Harmonic order(s).
- gas{“He”, “Ne”, “Ar”, “Kr”, “Xe”}
Target gas, sets the ionization potential.
- wavelengthfloat
Central wavelength of the driver [m].
- first_returnbool, default True
Keep only the short and long paths of the first return, as in dipole.
- rampfloat, default 2
Duration of the ramp [cycles].
- flatfloat, optional
Duration at constant amplitude [cycles], 3 for the first return and 20 for every return. The first return is steady about one cycle after the ramp. Every return converges slowly, to about 2e-2 with 10 cycles and 8e-3 with 20, since electrons born many cycles earlier still return.
- lastint, default 1
Number of cycles averaged, at the end of the flat part.
- points_per_cycleint, optional
Time steps per cycle, twice what resolves the cutoff Ip + 3.17 Up by default, at least 128.
- Returns:
- ndarray
Complex d_q [a.u.], shape I.shape + q.shape, with D(t) = Σ_q d_q·exp(−iqωt) in the steady state.
hhgsfa.analytic#
Analytic dipole phase of each quantum path.
φ_j(I) = a_j·I + b_j/I·(qω − Ip/ℏ)², trajectories ‘1’..’6’ (odd short, even long, returns 1 to 3), after Guo et al., J. Phys. B 51, 034006 (2018) and Wikmark et al., PNAS 116, 4779 (2019), who write α and γ for a and b.
- hhgsfa.analytic.cutoff_intensity(q, trajectory, gas, wavelength)#
Cutoff intensity of a trajectory, where qħω = Ip + c_up·Up.
- Parameters:
- qint
Harmonic order.
- trajectory{“1”, “2”, “3”, “4”, “5”, “6”}
Quantum path, odd short and even long, returns 1 to 3.
- gas{“He”, “Ne”, “Ar”, “Kr”, “Xe”}
Target gas, sets the ionization potential.
- wavelengthfloat
Central wavelength of the driver [m].
- Returns:
- float
Cutoff intensity [W/m²], NaN below threshold.
- Warns:
- UserWarning
If the harmonic is below threshold (qħω ≤ Ip).
- hhgsfa.analytic.d_dipole_phase_dI(I, q, trajectory, gas, wavelength)#
Local slope α_j = ∂φ_j/∂I = a_j − b_j/I²·(qω − Ip/ℏ)² of the dipole phase of a trajectory.
- Parameters:
- Iarray_like
Intensity [W/m²].
- qint
Harmonic order.
- trajectory{“1”, “2”, “3”, “4”, “5”, “6”}
Quantum path, odd short and even long, returns 1 to 3.
- gas{“He”, “Ne”, “Ar”, “Kr”, “Xe”}
Target gas, sets the ionization potential.
- wavelengthfloat
Central wavelength of the driver [m].
- Returns:
- ndarray
α_j [rad m²/W], NaN below the cutoff intensity.
- Warns:
- UserWarning
If the harmonic is below threshold (qħω ≤ Ip).
- hhgsfa.analytic.dipole_phase(I, q, trajectory, gas, wavelength)#
Dipole phase φ_j(I) = a_j·I + b_j/I·(qω − Ip/ℏ)² of a trajectory.
- Parameters:
- Iarray_like
Intensity [W/m²].
- qint
Harmonic order.
- trajectory{“1”, “2”, “3”, “4”, “5”, “6”}
Quantum path, odd short and even long, returns 1 to 3.
- gas{“He”, “Ne”, “Ar”, “Kr”, “Xe”}
Target gas, sets the ionization potential.
- wavelengthfloat
Central wavelength of the driver [m].
- Returns:
- ndarray
Phase [rad], NaN below the cutoff intensity.
- Warns:
- UserWarning
If the harmonic is below threshold (qħω ≤ Ip).
- hhgsfa.analytic.harmonic_dipole(I, q, trajectories, gas, wavelength, weights=None, q_eff=4)#
Harmonic dipole d_q(I) = I^(q_eff/2)·Σ_j w_j·exp(iφ_j(I)) of the chosen trajectories.
Each phase is frozen at its cutoff value below its cutoff intensity.
- Parameters:
- Iarray_like
Intensity [W/m²].
- qint
Harmonic order.
- trajectoriestuple of str
Quantum paths summed coherently, e.g. (“1”, “2”) for the short and long paths of the first return.
- gas{“He”, “Ne”, “Ar”, “Kr”, “Xe”}
Target gas, sets the ionization potential.
- wavelengthfloat
Central wavelength of the driver [m].
- weightsdict of str to float, optional
Amplitude w_j of each trajectory, 1 for those not given.
- q_efffloat, default 4
Intensity-scaling exponent of the harmonic yield,
|d|² ∝ I^q_eff.
- Returns:
- ndarray
Complex d_q at each intensity.
- Warns:
- UserWarning
If the harmonic is below threshold (qħω ≤ Ip).