device_builder.utils.confinement
Helper functions for quantum dots and wells.
Useful function concerning the calculation of finite well and harmonic confinement states.
Copyright © 2024-2025 HQS Quantum Simulations GmbH. All Rights Reserved.
Get decay constant for quantum well wave function.
Returns alpha, i.e., the decay rate in exp[+/- alpha x], for the wave function of a quantum well in the classically forbidden region, given the energy and the depth of the well.
NOTE: Only well defined for well_depth > energy.
Arguments:
- energy (float): Energy in eV.
- well_depth (float): Well depth in eV.
- effective_mass (float): Effective mass of oscillator in units of rest mass of an electron.
Returns:
float: decay constant in 1 / Angstrom.
Get wave vector for quantum well wave function.
Returns k, i.e., the wave vector cos[k x], for the wave function of a quantum well inside the well, given the energy.
NOTE: Only well defined for energy > 0.
Arguments:
- energy (float): Energy in eV.
- well_depth (float): Well depth in eV.
- effective_mass (float): Effective mass of oscillator in units of rest mass of an electron.
Returns:
float: wave vector in 1 / Angstrom.
Solve for energy of quantum well.
Arguments:
- well_depth (float): Well depth in eV.
- well_width (float): Well width in Angstrom.
- effective_mass (float): Effective mass of oscillator in units of rest mass of an electron.
- max_iter (int): Maximum number of steps for solving characteristic equation.
Raises:
- RuntimeError: If characteristic function cannot be bracketed in max_iter steps.
Returns:
float: Ground state energy of quantum well in eV.
Get force constant from level spacing and effective mass.
The force constant, k, implies a quadratic term, +1/2 * k * x^2, in the Hamiltonian, where x is the displacement.
Arguments:
- level_spacing (float): Level spacing (hbar omega) of harmonic oscillator in eV.
- effective_mass (float, optional): Effective mass of oscillator in units of rest mass of an electron. Defaults to 1.0.
Returns:
float: Force constant in eV / Angstrom^2.
Get characteristic length from level spacing and effective mass.
The characteristic length is defined as the distance between the classical turning points of the ground state of the harmonic oscillator.
Arguments:
- level_spacing (float): Level spacing (hbar omega) of harmonic oscillator in eV.
- effective_mass (float, optional): Effective mass of oscillator in units of rest mass of an electron. Defaults to 1.0.
Returns:
float: Characteristic length in Angstrom.
Function generator for harmonic oscillator wave function.
Arguments:
- level_spacing (float): Defines level spacing of harmonic oscillator in eV.
- effective_mass (float, optional): Effective mass of the oscillating particle. Defaults to 1.0.
Returns:
Callable[[np.ndarray], np.ndarray]: Function returning oscillator wave function evaluated at input positions.