Skip to content

Potentials

Potentials for wavepacket time propagation.

All potentials are evaluated through V(x, t), where x may be a scalar or a NumPy array of positions. The return value is complex: an imaginary part acts as an absorber.

Potential

Base class for potentials. All potentials should inherit from this class.

Derived classes set the attribute is_time_dependent and implement V(r, t), which must accept array-valued positions.

V(r, t)

Potential V(r,t).

Potential1d

Bases: Potential

Potentials in 1d.

PotentialSuperposition1d(pots)

Bases: Potential1d

Create a superposition of several potentials.

Create a superposition of several potentials.

Parameters:

Name Type Description Default
pots list

List of potentials to be added.

required

ConstantPotential(V0)

Bases: Potential1d

Constant Potential for free particle propagation.

Create constant potential V0.

BoxPotential(pos, width, height)

Bases: Potential1d

A box potential of given position, width and height.

Create a box potential in one dimension.

Parameters:

Name Type Description Default
pos float

Center position.

required
width float

Half width of box.

required
height float

Height of the box (may be negative).

required

SmoothedBoxPotential(pos, width, height, exponent=18)

Bases: Potential1d

A smoothed box potential of given position, width and height. The potential is V = H*exp(-(|x_0 - x|/b)^N).

Create smoothed box potential in 1d.

Parameters:

Name Type Description Default
pos float

Center position.

required
width float

Width of box.

required
height float

Height of the box (may be negative).

required
exponent integer

Integer exponent that determines the slope of the box' side walls.

18

WellPotential1d(pos, width, V0, V_wall, d=-1.0, V_ext=0.0)

Bases: Potential1d

A quantum well potential.

Create a (symmetric) quantum well potential of given position, width, well potential, wall "height", and, optionally, wall thickness.

Parameters:

Name Type Description Default
pos float

center coordinate of well

required
width float

width of well

required
V0 float

Potential inside the well.

required
V_wall float

Wall potential

required
d float

Wall thickness. Negative values correspond to infinite thickness.

-1.0
V_ext float

Potential beyond the walls of the well. Relevant only for finite wall thickness.

0.0

V(r, t)

Well potential at r, t.

SquareWell1d(x0, omega, width, V0, well=True)

Bases: Potential1d

A "square well": a parabola inside a region of given width, continued by constant potentials to each side.

Create a "square well" potential.

Parameters:

Name Type Description Default
x0 float

Center position.

required
omega float

Harmonic oscillator frequency.

required
width float

Width a the well.

required
V0 float

Potential at the crest of the parabola. The outside potential is determined by the width. It is chosen such that that V is continuous.

required
well boolean

If True, the outside potential is higher than the crest potential, thus, a well is formed. If False, a bump potential is created.

True
Note

If you want an oscillator frequency that gives you a specific V_outside for given width and V0, use this formula: omega = sqrt(2(V_1 - V_0)/(sign*(d/2)^2)).

MicrocavityRadialPotential(R, n, k, m)

Bases: Potential1d

The radial potential as used in microcavity optics of the circle.

Create a microcavity style radial potential \(V = k^2(1 - n^2(r)) + m^2/r^2\). A refractive index of \(n\) is assumed inside the cavity, whereas air (\(n=1\)) is assumed on the outside.

Parameters:

Name Type Description Default
R float

Cavity radius.

required
n float

Refractive index of semiconductor.

required
k float

Wavenumber (acts like a shape parameter).

required
m int

Rotational mode number.

required

EckartPotential1d(x0, V0, alpha)

Bases: Potential1d

The Eckart potential barrier.

Create an Eckart potential \(V = V_0 \sech(\alpha (x-x_0)^2)\).

Parameters:

Name Type Description Default
x0 float

Center position of the bump.

required
V0 float

Height of the bump.

required
alpha float

Shape parameter.

required
Notes

Reference: Eckart, Phys. Rev. 35, 1303 (1930).

GaussBarrier1d(x0, V0, sigma)

Bases: Potential1d

A Gaussian bump in \(1d\).

Create a Gaussian bump \(V(x) = V_0 \exp(-(x-x_0)^2/2\sigma^2)\).

Parameters:

Name Type Description Default
x0 float

Center position of the Gaussian bump.

required
V0 float

Height of the bump.

required
sigma float

Width or standard deviation of the potential bump.

required

Ramp1d(x0, V0, alpha, uphill)

Bases: Potential1d

A ramp potential.

Create a ramp potential \(V = V_0/2 (1 + \tanh((x-x_0)/(2\alpha)))\).

Parameters:

Name Type Description Default
x0 float

Center position of the ramp.

required
V0 float

Height of the ramp.

required
alpha float

Shape parameter. The smaller the value, the steeper the ramp.

required
uphill boolean

If True, the potential is uphill. Is False, it goes "downhill".

required
Notes

A Bohmian investigation of this potential can be found in Poirier, J. Chem. Phys. 124, 034116 (2006).

MovingRamp1d(x0, V0, alpha, uphill, motion_type, frequency, motion_ampl, phase)

Bases: Potential1d

A moving ramp potential.

Create a moving ramp potential \(V = V_0/2 (1 + \tanh((x-x_0(t))/(2\alpha)))\).

Use this to construct a Fermi accelerator.

Parameters:

Name Type Description Default
x0 float

Center position of the ramp.

required
V0 float

Height of the ramp.

required
alpha float

Shape parameter. The smaller the value, the steeper the ramp.

required
uphill boolean

If True, the potential is uphill. Is False, it goes "downhill".

required
motion_type string

"sin" for \(sin(\omega t)\) time dependence (only option so far).

required
frequency float

Frequency of oscillation.

required
motion_ampl float

Amplitude of ramp position oscillation.

required
phase float

Phase of oscillation.

required

HarmOscPot(omega0, x0=0.0)

Bases: Potential1d

Harmonic oscillator potential \(V = \omega_0^2 x^2/2\).

Create harmonic oscillator potential \(V = \omega_0^2 (x-x_0)^2/2\) in 1d.

Parameters:

Name Type Description Default
omega0 float

Harmonic oscillator frequency.

required
x0 float

Center position.

0.0

InterpolatingPotential1d(points)

Bases: Potential1d

Interpolating polynomial potential defined by a set of points.

Create a polynomial potential that interpolates the given points.

Parameters:

Name Type Description Default
points list

List of tuples (x_i, y_i).

required

RandomPotential1d(corr_func, x, V0, rng=None, normalize='max')

Bases: Potential1d

Create a random potential from a given autocorrelation function.

Create random potential.

Parameters:

Name Type Description Default
corr_func callable

Correlation function C(dx); must accept arrays.

required
x array

The (equidistant) grid values.

required
V0 float

Amplitude of the potential, see normalize.

required
rng Generator or int

Random number generator or seed for reproducible potentials.

None
normalize (max, std)

Scale the potential such that its maximum absolute value ("max") or its standard deviation ("std") equals V0.

"max"

ExpAbsorber1d(A_real, A_imag, lreal, limag, x0, x1, absorb_left=True, absorb_right=True)

Bases: Potential1d

Absorbing complex potential.

A complex potential with negative real part absorbs better (the negative real part increases kinetic energy and decreases the de Broglie wavelength, which makes absorption easier). Use a negative imaginary part for absorption.

Compare e.g. Hussain and Roberts, Phys. Rev. A 63, 012703 (2000).

Create absorbing complex potential in 1d.

Parameters:

Name Type Description Default
A_real float

Amplitudes of real and imaginary part.

required
A_imag float

Amplitudes of real and imaginary part.

required
lreal float

Accelerating length of potential.

required
limag

Absorbing length of potential.

required
x0 float

Outer points of spatial grid.

required
x1 float

Outer points of spatial grid.

required
absorb_left bool

Absorb on the left respectively right boundary of the grid.

True
absorb_right bool

Absorb on the left respectively right boundary of the grid.

True

PowerAbsorber1d(width, strength, x0, x1, power=2, absorb_left=True, absorb_right=True)

Bases: _EdgeAbsorber1d

Complex absorbing potential \(-i\eta\,u^n\) in layers at the edges, \(u\) rising from 0 to 1 across a layer of width \(w\); the 1d counterpart of BoundaryAbsorber2d (which has \(n = 2\)).

Slow waves are reflected by the onset of the potential, fast ones are transmitted through the layer (and come back from the other side of the periodic grid); for a given width, \(\eta\) trades one for the other. The reflection is smallest for wavelengths much shorter than \(w\). Cmp. Riss and Meyer, J. Phys. B 28, 1475 (1995).

Create absorbing layers.

Parameters:

Name Type Description Default
width float

Width w of each layer.

required
strength float

Maximum absorption rate eta (positive), reached at the edge.

required
x0 float

Grid boundaries.

required
x1 float

Grid boundaries.

required
power float

Exponent n.

2
absorb_left bool

Absorb at the left respectively right boundary of the grid.

True
absorb_right bool

Absorb at the left respectively right boundary of the grid.

True

ManolopoulosAbsorber1d(E_min, x0, x1, delta=0.2, absorb_left=True, absorb_right=True)

Bases: _EdgeAbsorber1d

Transmission-free complex absorbing potential of Manolopoulos, J. Chem. Phys. 117, 9552 (2002).

The potential \(-i\,\frac{1}{2}(2\pi/w)^2 f(y)\) with \(f(y) = ay - by^3 + 4/(c - y)^2 - 4/(c + y)^2\) and \(y = c\,u\) diverges at the edge, so nothing is transmitted. The width is fixed by the lowest energy to absorb, \(w = c/(2\delta k_\mathrm{min})\) with \(E_\mathrm{min} = k_\mathrm{min}^2/2\); for \(\delta = 0.2\) the reflection is below 1% for all \(E > E_\mathrm{min}\) and falls rapidly with energy. The constants are \(c = 2.62206\), \(a = 1 - 16/c^3\) and \(b = (1 - 17/c^3)/c^2\).

Use it at the edges of the grid. The divergence is cut off at a large finite value, so the grid point on the edge just sets \(\psi = 0\) in each step.

Create absorbing layers.

Parameters:

Name Type Description Default
E_min float

Lowest kinetic energy that is absorbed well.

required
x0 float

Grid boundaries.

required
x1 float

Grid boundaries.

required
delta float

Accuracy parameter; smaller values give a wider layer and less reflection near \(E_\mathrm{min}\).

0.2
absorb_left bool

Absorb at the left respectively right boundary of the grid.

True
absorb_right bool

Absorb at the left respectively right boundary of the grid.

True

MaskAbsorber1d(width, dt, x0, x1, power=1 / 8, absorb_left=True, absorb_right=True)

Bases: _EdgeAbsorber1d

Multiply \(\psi\) by the mask \(\cos^{p}(\pi u/2)\) once per time step, written as the complex potential \(i\ln(\cos^{p}(\pi u/2))/\Delta t\).

Masks are popular in strong-field physics, often with \(p = 1/8\), cmp. Krause, Schafer and Kulander, Phys. Rev. A 45, 4998 (1992). Since the mask acts once per step, its effect depends on the time step: use it with the dt it was made for (with SplitOperator(order=4) the substeps still add up to one mask per step).

Parameters:

Name Type Description Default
width float

Width w of each layer.

required
dt float

Time step of the propagation.

required
x0 float

Grid boundaries.

required
x1 float

Grid boundaries.

required
power float

Exponent p.

1 / 8
absorb_left bool

Absorb at the left respectively right boundary of the grid.

True
absorb_right bool

Absorb at the left respectively right boundary of the grid.

True

Potential2d

Bases: Potential

Potentials in 2d. V(r, t) takes r = (X, Y).

HarmOscPot2d(omega_x, omega_y=None, x0=0.0, y0=0.0)

Bases: Potential2d

Anisotropic harmonic oscillator \(V = (\omega_x^2 (x-x_0)^2 + \omega_y^2 (y-y_0)^2)/2\).

GaussBump2d(x0, y0, V0, sigma)

Bases: Potential2d

Gaussian bump \(V = V_0 \exp(-((x-x_0)^2 + (y-y_0)^2)/2\sigma^2)\).

StadiumPotential2d(a, R, V0, w=0.1, x0=0.0, y0=0.0)

Bases: Potential2d

Bunimovich stadium: a rectangle of length \(2a\) and height \(2R\) capped by two half circles of radius \(R\), centered at \((x_0, y_0)\).

The potential is zero inside and \(V_0\) outside, with walls smoothed over a width \(w\): \(V = V_0/2\,(1 + \tanh(d/w))\), where \(d\) is the signed distance to the boundary (negative inside). With \(a = 0\) the stadium is a circle, whose classical dynamics is integrable, while every stadium with \(a > 0\) is chaotic.

Create a stadium potential.

Parameters:

Name Type Description Default
a float

Half length of the straight segments.

required
R float

Radius of the half circles.

required
V0 float

Potential outside.

required
w float

Width of the smoothed walls.

0.1
x0 float

Center.

0.0
y0 float

Center.

0.0

signed_distance(r)

Signed distance to the stadium boundary (negative inside).

LimaconPotential2d(R, eps, V_in, V_out=0.0, w=0.02, x0=0.0, y0=0.0)

Bases: Potential2d

Billiard or dielectric cavity shaped like Pascal's limaçon, \(\rho(\varphi) = R\,(1 + \varepsilon\cos\varphi)\) in polar coordinates around \((x_0, y_0)\).

The potential is \(V_\mathrm{in}\) inside and \(V_\mathrm{out}\) outside, with walls smoothed over a width \(w\): \(V = V_\mathrm{in} + (V_\mathrm{out} - V_\mathrm{in})/2\,(1 + \tanh(d/w))\), where \(d\) is an approximate signed distance to the boundary (negative inside, exact on the boundary to first order). For \(\varepsilon = 0\) the limaçon is a circle; for \(\varepsilon > 1/4\) it has a dimple at \(\varphi = \pi\); for \(\varepsilon < 1\) it has no inner loop.

A large \(V_\mathrm{out}\) gives a billiard. A well, \(V_\mathrm{in} < V_\mathrm{out} = 0\), models a dielectric cavity: the Schroedinger equation \((\nabla^2 + 2(E - V))\psi = 0\) at energy \(E = k^2/2\) is the Helmholtz equation \((\nabla^2 + n^2 k^2)\psi = 0\) of TM polarized light with refractive index \(n\) inside and 1 outside if \(V_\mathrm{in} = (1 - n^2) E\), see dielectric(). The analogy holds at that one energy only: a state at energy \(E'\) sees the index \(n' = \sqrt{(E' - V_\mathrm{in})/E'}\). With \(n = 3.3\) and \(\varepsilon \approx 0.43\) the limaçon combines high-Q whispering gallery modes with directional emission, cmp. Wiersig and Hentschel, Phys. Rev. Lett. 100, 033901 (2008).

Create a limaçon potential.

Parameters:

Name Type Description Default
R float

Radius parameter.

required
eps float

Deformation $ arepsilon$, between 0 (circle) and 1.

required
V_in float

Potential inside.

required
V_out float

Potential outside.

0.0
w float

Width of the smoothed walls.

0.02
x0 float

Pole of the limaçon, the origin of $ arphi$.

0.0
y0 float

Pole of the limaçon, the origin of $ arphi$.

0.0

dielectric(R, eps, n, E, w=0.02, x0=0.0, y0=0.0) classmethod

Dielectric cavity with refractive index n in vacuum, for the energy E: a well of depth \((n^2 - 1) E\).

boundary(phi)

Points \((x, y)\) of the boundary at the polar angles phi.

signed_distance(r)

Approximate signed distance to the boundary (negative inside): \((r - \rho(\varphi))/\sqrt{1 + (\rho'(\varphi)/r)^2}\).

RandomPotential2d(corr_func, x, y, V0, rng=None, normalize='std')

Bases: Potential2d

Gaussian random potential with a given autocorrelation function.

The potential is drawn on a periodic grid and interpolated (with periodic continuation) when evaluated elsewhere. Weak, smooth random potentials cause branched flow: a wave entering such a medium splits into narrow branches, cmp. Topinka et al., Nature 410, 183 (2001) and Heller, Kaplan, Dahlen, Phys. Today 74(4), 44 (2021).

Create a random potential.

Parameters:

Name Type Description Default
corr_func callable

Correlation function C(dx, dy); must accept arrays.

required
x array

Equidistant grid values along x and y.

required
y array

Equidistant grid values along x and y.

required
V0 float

Amplitude of the potential, see normalize.

required
rng Generator or int

Random number generator or seed.

None
normalize (std, max)

Scale the potential such that its standard deviation ("std") or maximum absolute value ("max") equals V0.

"std"

BoundaryAbsorber2d(size, width, strength)

Bases: Potential2d

Absorbing layer along the edges of a rectangular grid.

Inside a layer of width \(l\) along each edge, the potential is \(-i\eta\,((l - d)/l)^2\) with \(d\) the distance to the edge. The quadratic onset keeps reflections small.

Create an absorbing boundary layer.

Parameters:

Name Type Description Default
size tuple

Grid boundaries ((x_min, x_max), (y_min, y_max)).

required
width float

Width l of the absorbing layer.

required
strength float

Maximum absorption rate eta (positive).

required

gaussian_random_field(shape, spacing, corr_func, rng=None)

Draw a real Gaussian random field with a given autocorrelation function on a periodic grid.

By the Wiener-Khinchin theorem, the power spectrum of the field is the Fourier transform of its autocorrelation function. White noise is filtered with the square root of that spectrum, which leaves the desired correlations.

Parameters:

Name Type Description Default
shape tuple of int

Number of grid points per dimension.

required
spacing tuple of float

Grid spacing per dimension.

required
corr_func callable

Correlation function C(*lags), called with one array of lags per dimension.

required
rng Generator or int

Random number generator or seed.

None

Returns:

Name Type Description
field array

Field with zero mean and unit standard deviation.