design decisions
To summarise discussion (10/09/2018) about Semicon design:
- Renormalization parameters (effective parameters -> bare parameters) should be separated from workaround the spurious solution. This will simplify the logic and make more visible distinction between these two operations.
- Parameters should be more tight with the model, as the parameter renormalization (see point 1) is model dependent.
- Helper that provides piece-wise parameter functions for stacking different materials should be more general.
API Design
In addition to keeping in mind above few suggestions lets make this thread a general discussion about the API design.
Need for more abstraction in API
In addition to Kane model that describes well Zincblende structures we should also make room to easily provide e.g. Wurtzide models (see issue #1). These models in principle will have different Hamiltonians and parameters.
Specialised models, like Zincblende
, could inherit from a base bulk Model
:
graph TD;
Model-->Zincblende;
Model-->Wurtzite;
Model-->...;
Base Model
would also guarantee that required API elements like hamiltonian
and parameters
are implemented:
graph TD;
Model-->hamiltonian;
Model-->parameters;
Model-->...;
Required information for a specific components
-
Hamiltonian: Hamiltonian requires information about present
coords
,bands
andcomponents
-
Parameters: Bulk parameters require information about present
bands
,components
(so that it can be verified that required parameters are present) and thedatabank
(source of the parameters).
Of course parameters
are material specific (different for InAs or GaSb) whereas same Hamiltonian
will be used for all materials present in the simulation, as the main idea for dealing with heterostructures with k.p models is to use same Hamiltonian with parameters that vary in space).
Regarding the following I believe that:
-
components
andbands
should be provided via constructor -
hamiltonian
should be a property -
parameters
should be a method that takes single parameter about the material.
Removing spurious solution
There should be a way to easily remove spurious solutions.
It is probably good to logically separate this operation from Model.parameters
method.
As this is model specific it may be good idea to introduce a new class (of which instances are returned by Model.parameters
that has a convenience methods to remove spurious solutions, e.g.
model = Zincblende(bands=..., components=....)
InAs = model.parameters('InAs')
InAs = InAs.renormalize(gamma_0=1)
where InAs would be of type
class ZincblendeParameters(Parameters):
pass
This in principle would allow to get all required parameters as
parameters = {k: model.parameters(material=k).renormalize(gamma_0=1)
for k in ['InAs', 'GaSb', 'AlSb']}
Beyond bulk models
Above discussion covers the bulk models and specify interface for getting Hamiltonians and parameters. Beyond bulk systems semicon
should also handle various heterostructures (like 2DEGs or nanowires) that in principle can be made out of few different materials and have different growth directions.
Heterostructure parameters
For heterostructures some of bulk parameters (that would go into syst.hamiltonian_submatrix
argument params
) will be a space dependent function instead of a scalar.
For example material band edges E_c
and E_v
for a 2DEG will now be E_c(z)
and E_v(z)
that can look for example like following:
To create such a function one require:
- bulk parameters of each of present materials
- mapping: coordinate -> material name
- site locations (to properly conduct the interpolation procedure)
Different growth directions
Procedure details are discussed in issue #12 (closed). This operation require to know:
- information about new crystal axes orientation (provided through rotation matrix R)
- spin operators of the model's basis: this should be provided through method of a bulk
Model
as it requires to know the presentbands
.
As this is generally useful I see implementation of a function that does the main job in collection of helper functions, e.g.
def rotate(hamiltonian_matrix, R, S):
pass
and Model's having a method Model.rotate(R)
that returns a copy of rotated Hamiltonian.
Things to also keep in mind
But all means not complete list things I don't know where to put yet:
- parameters plotting
- shapes library
- where to provide support for ternary alloys?