# Application note: mqwgain script command

General Description and Main Steps

Also note that, like with any other script command, the graphical user interface (GUI) will not be responsive while running mqwgain command. This is not cause for alarm and the GUI will become responsive again after the command is executed, which can take from several minutes to several tens of minutes depending on the problem size.

The 2019B R2 release comes with a new script command mqwgain. It calculates stimulated and spontaneous emission coefficients in the multiple-quantum well (MQW) structure. These results can be used as inputs to the travelling wave laser model (TWLM) to calculate LI curves and laser spectra. They can also be used to calculate the absorption due to the quantum confined Stark effect (QCSE) in electro-absorption modulators (EAM). A detailed description of the inputs and outputs for mqwgain can be found in our knowledge base for mqwgain. The related command to generate the material parameters that mqwgain requires is buildmqwmaterial.

The MQW gain calculation is based on the 4x4 k.p method as given in references [1-3]. The method is mainly suitable for III-V materials with Zincblende crystal structure. Specifically, the list of materials supported by our default database is given in the KB documentation. In addition, other materials may be used by providing all required material properties.

The main steps necessary for using mqwgain command are:

• Create material parameters.
• Create inputs for mqwgain command (mqwgain).
• Run mqwgain.

Internally, the gain of the MQW structure is calculated using the following algorithm:

1. Electronic band structure is calculated using the 4x4 k.p method. One eigenproblem in the valence band is solved for each transverse wave vector, while in the conduction band only one eigenproblem is solved in total at zero wave vector using the parabolic band assumption. The result of this step is the electronic wave functions and sub-bands in the conduction and valence bands of the quantum wells. These represent states confined in the quantum wells.
2. Fermi level calculation. This energy level controls the occupation probability for each confined state through the Fermi-Dirac distribution function. Its value depends on the band structure (calculated in step 1) and on the charge density (input parameter).
3. Stimulated and spontaneous emission calculation. These emissions depend on the occupation of quantum well levels (step 2) and the overlap of wave functions between conduction and valence bands. The stimulated emission corresponds to gain, while the spontaneous emission mainly contributes to optical loss (it also seeds lasing when gain becomes larger than all loss mechanisms). Negative gain is equivalent to absorption that can be used in the simulations of EAMs based on the quantum confined Stark effect.

Obtaining Material Properties

The material properties have significant effects on the final results. While there are many published works listing important material properties for semiconductors of interest, it can be challenging to find accurate properties for certain ternary and quaternary materials. We allow several methods to define the material properties and customizing them:

1. By specifying materials and compositions directly at the input of mqwgain script command:
materials = cell(3);
#...
materials{2} = struct;
materials{2}.database_material = "AlGaAs";
materials{2}.x = 0.41;
The material properties will be defined based on our default material database. To customize, the users can provide their own database, which should be in the correct format of the default database:
config.materialdb = "/home/auser/myfolder/my_material_db.json";
For more details please check the documentation.

2. By first calling buildmqwmaterial command, which returns the material properties as a struct that can be directly used as an input to mqwgain.
materials = cell(3);
#...
materials{2} = buildmqwmaterial("/home/auser/myfolder/my_material_db.json", 300, "InAlAs", 0.47);
To customize properties, this method provides direct access to all of the material properties from the script. For more details please check the mqwgain and buildmqwmaterial documentation.

3. The users can also provide all material properties on their own. The properties should be provided as a struct with specific fields. For more details about the required fields please check the mqwgain or buildmqwmaterial documentation.

• Relevant electron and hole states in the MQW structure are confined to the quantum wells. For physically meaningful results all other states should be filtered out. This is controlled at input by setting the boundary conditions. There are two types of boundary conditions: hard wall (wave function drops to zero at the boundary) and perfectly matched layer (PML). They are selected by the option pmlactive = true or false. For both types of boundary conditions it is best to extend the simulation region by a uniform potential to ensure that the wave function decays sufficiently towards the boundaries (~10nm is usually enough on each side). For hard wall boundaries and PML, the selection of confined states is governed by a threshold on the magnitude of the wave function derivative at the boundaries (option hwcutoff) or a threshold on the total probability density inside the PML, respectively. Sometimes it may be necessary to adjust these parameters from their default values to ensure that only confined states or enough confined states are selected. Whether a state is confined can be confirmed visually by inspecting the probability density near the boundaries (it should be vanishing).
• The electronic band structure (E,k) calculation is 1D, since the two in-plane directions (transverse to the growth direction) are considered rotationally symmetric: wavevector k corresponds to the radial component. In order to accurately calculate the Fermi level for the given charge density it is necessary to include enough (E,k) states in the calculation. This is especially important if the simulation temperature is much higher than the room temperature, when larger k values contribute non-negligibly to the density according to the Fermi-Dirac distribution. It is usually enough to include 10% of the Brillouin zone (i.e. 2π/a*0.1, where a is the lattice constant) at room temperature and up to 20% at high temperatures. This is set by the option kt.

Input Charge Density and Output Emission Coefficients

One detail to note is the definition of charge density and emission coefficients (stimulated and spontaneous emission) used in the MQW gain solver. This may be important when comparing results from the solver with other results in the literature or with measurements.

In a MQW gain simulation, the carrier density input is a scalar that is averaged over the total simulation span. Typically, the carrier density in the quantum wells is larger than this. To convert to the quantum well density we can approximately assume that the charge is all confined in the quantum wells and then multiply the averaged density by the ratio of total thickness and quantum well thickness (taking all quantum wells into account).

The emission coefficients at the output are also calculated relative to the total simulation span. To convert to emission considering quantum wells only, we can again multiply by the ratio of total thickness to quantum well thickness. Note that the definition of thickness is consistent: for example, when using the gain and spontaneous emission from mqwgain in the travelling wave laser model, the mode confinement factor will also be calculated over the total thickness, so that the mode overlap with the active region will be larger than the overlap with the quantum wells only, but the emission coefficients are proportionally smaller by the same factor.

1. D. Ahn et al., J. Appl. Phys. 64, 4056 (1988)
2. S. L. Chuang, Physics of Optoelectronic Devices
3. Chuang, Phys. Rev. B, 43, 9649 (1991)

Benchmark results and example scripts

The following two references implement the same method as mqwgain and are used here for benchmarking purposes as well as to provide example scripts. Since the cited papers define most of their parameters we use those custom parameters instead of our default database in order to ensure fair comparison. The custom material parameters are defined in mqw_material_build_functions.lsf (14.1 KB) mqw_material_database.lsf (1.7 KB) which should be placed in the same folder as the main script.

1. For benchmarking stimulated and spontaneous emission coefficients and temperature dependence (mqwgain_hardwall_0kVpercm_sqw_Ahn1988_gain.lsf (2.9 KB) mqwgain_hardwall_50kVpercm_sqw_Ahn1988_gain.lsf (2.9 KB) mqwgain_pml_0kVpercm_sqw_Ahn1988_maxgain_vs_temperature.lsf (2.6 KB) ):

D. Ahn, S. L. Chuang, and Y.C. Chang, Valenceband mixing effects on the gain and the refractive index change of quantumwell lasers, J. Appl. Phys. 64, 4056 (1988).

1. For benchmarking strain effects (mqwgain_hardwall_0kVpercm_sqw_Chuang1991_strain.lsf (3.9 KB) ):

S. L. Chuang, Efficient band-structure calculations of strained quantum wells, Phys. Rev. B, vol. 43, no. 12, 1991.

Gain at 0 zero electric field:

Gain at 50kV/cm electric field:

Maximum gain vs temperature:

Effects of strain due to varying material composition on the band gaps between the lowest conduction band (C1) and the highest light hole (LH1) and heavy hole (HH1) valence bands:

C1-HH1 band gap x=0.37 x=0.47 x=0.57
mqwgain 0.729 0.802 0.874
Chuang 1991 0.727 0.8 0.872
C1-LH1 band gap x=0.37 x=0.47 x=0.57
mqwgain 0.824 0.842 0.862
Chuang 1991 0.827 0.845 0.867

Example: Calculating Gain Spectra vs. Temperature

In this example, based on the device described in Ref. 1, we demonstrate the calculation of gain spectra with respect to temperature. Material model parameters for the quantum well and barrier materials, quaternary InGaAsP grown on an InP substrate, are extracted from the material database included with the solver, but some parameters are modified to use corresponding values from Ref. 1 to obtain good agreement with the published results.

The following figure compares gain vs temperature at fixed charge density with the spectra reported in Ref. 1.

To improve the agreement between results, some material parameters from our default material database were customized:
• The valence band offsets from Ref. 1 were used
• The band gap from Ref. 2 was used
• The temperature- and carrier density-dependent correction models from Ref 1. were applied to the band gap
• The average carrier density used in mqwgain was obtained from the quantum well density reported in Ref. 1 according to the method explained above in section Input Charge Density and Output Emission Coefficients. The same conversion is done to the gain curves before comparing them with the reference.

Note that the gain spectra from the mqwgain command are broader than those reported in Ref. 1. This is likely due to the calculation of the states from coupled (rather than independent) quantum wells, which results in sub-band splitting. This splitting increases the span of the energy range for the sub-band states, which leads to a broadening of the gain response. While it is difficult to determine which set of gain curves is more accurate due to the lack of measurement data, this level of discrepancy is not expected to cause major differences in the measurable quantities, like laser LI curves.

For an example how to set up gain simulation using uncoupled quantum well approximation for the same structure as shown in the figure above see uncoupled mqw. This approach is recommended whenever applicable, as it leads to much faster simulation.

The following scripts can be used to reproduce the figure: mqwgain_InGaAsP_laser.lsf (8.1 KB) piprek2000_fig7.lsf (1.4 KB). The resulting gain spectra can be used as inputs into the travelling wave laser compact model to build a comprehensive circuit model of the light source.

The mqwgain command outputs four datasets contained in a struct. Please see the mqwgain documentation for more details. To visualize mqwgain output datasets, use the script command visualize(x), where x is the dataset. For example, to visualize the probability density (wave function magnitude squared), run visualize(out.wavefunction), where out is the name of the variable to which the output of mqwgain is assigned.

The first visualization window shows the probability density corresponding to the wave function of the first basis vector of the lower Hamiltonian, while the second visualizer window corresponds to the second basis vector of the lower Hamiltonian. The 4x4 k.p basis used by the solver is based on a unitary transformation that splits the 4x4 Hamiltonian into two 2x2 Hamiltonians (lower and upper) for which the eigenproblem solution is more efficient [2,3]. The probability densities are plotted against the transverse wave vector (y-axis) for the first subband and show that the corresponding (E,k) states in the band structure are states confined to the MQW region, since the probability density decays at the boundaries.

1. J. Piprek, P. Abraham, and John E. Bowers, Self-Consistent Analysis of High-Temperature Effects on Strained-Layer Multiquantum-Well InGaAsP–InP Lasers, IEEE Journal of Quantum Electronics, vol. 36, no. 3, March 2000.
2. S. L. Chuang, Physics of Photonic Devices, 2009
3. D. Ahn, S. L. Chuang, and Y.C. Chang, Valenceband mixing effects on the gain and the refractive index change of quantumwell lasers, J. Appl. Phys. 64, 4056 (1988).

For the full laser diode simulation workflow see simulation of LI curves for InGaAsP/InP MQW ridge laser.