qimpy.transport.material.Material

class Material(*, checkpoint_in=(None, ''))

Bases: TreeNode

Base class / interface for material specifications.

Parameters:

checkpoint_in (CheckpointPath)

__init__(*, checkpoint_in=(None, ''))
Parameters:

checkpoint_in (CheckpointPath)

Return type:

None

Methods

__init__

add_child

Construct child object self.`attr_name` of type cls.

add_child_one_of

Invoke add_child on one of several child options in args.

get_contactor

Return a function (or callable object) to calculate the distribution function at a contact with orientation n and specified keyword arguments.

get_observable_names

Return list of observable names, specific to each material.

get_observables

Return tensor of complex conjugates of all observables specific to each material.

get_reflector

Return a function (or callable object) to calculate reflections for a sequence of surface points with unit normals (Nsurf x 2).

initialize

Initialize shared material parameters (call from a derived class.)

initialize_fields

Initialize spatially-dependent / parameter sweep values.

measure_observables

Return expectation value of observables, (Nx x Ny x No).

rho_dot

Return material contribution to drho/dt.

save_checkpoint

Save self and all children in hierarchy to cp_path.

Attributes

transport_velocity

Effective velocity for each density-matrix component.

comm

Communicator for reciprocal-space split over k

k_division

Division of k-points over MPI

k_mine

slice of k on current process

nk_mine

number of k-points on current process

n_bands

number of bands at each k

n_dim

dimensionality of material (2 or 3)

wk

Brillouin zone integration weight

k

nk_mine x n_dim wave vectors

E

nk_mine x n_bands energies

v

nk_mine x n_bands x n_dim velocities in plane

rho0

nk_mine x n_bands x n_bands initial density matrix

dt_max

maximum stable time-step (set to inf if not available)

child_names

Names of attributes with child objects.

variant_name

Version of children having variants (if any)

abstractmethod get_contactor(n, **kwargs)

Return a function (or callable object) to calculate the distribution function at a contact with orientation n and specified keyword arguments. For an Nsurf x 2 tensor n, the function should take time t as an input and return the corresponding Nsurf x Nkbb_mine distribution function.

Parameters:

n (Tensor)

Return type:

Callable[[float], Tensor]

abstractmethod get_observable_names()

Return list of observable names, specific to each material.

Return type:

list[str]

abstractmethod get_observables(t)

Return tensor of complex conjugates of all observables specific to each material. (No x Nkbb_mine) where No is number of observables.

Parameters:

t (float)

Return type:

Tensor

abstractmethod get_reflector(n)

Return a function (or callable object) to calculate reflections for a sequence of surface points with unit normals (Nsurf x 2). This function will be called with a Nghost x Nsurf x Nkbb_mine tensor, and the reflection should be calculated pointwise in real-space with output of the same dimensions.

Parameters:

n (Tensor)

Return type:

Callable[[Tensor], Tensor]

initialize(*, wk, nk, n_bands, n_dim, process_grid)

Initialize shared material parameters (call from a derived class.)

Parameters:
  • wk (float)

  • nk (int)

  • n_bands (int)

  • n_dim (int)

  • process_grid (ProcessGrid)

Return type:

None

abstractmethod initialize_fields(rho, params, patch_id)

Initialize spatially-dependent / parameter sweep values. Using named properties params, containing tensors that should broadcast with the grid dimensions, update the density matrix rho to be spatially varying if necessary and calculate any named fields for use during dynamics. Note that the cached quantities must be associated with patch_id, as there may be multiple spatial domains (patches) sharing the same material.

Parameters:
  • rho (Tensor)

  • params (dict[str, Tensor])

  • patch_id (int)

Return type:

None

measure_observables(rho, t)

Return expectation value of observables, (Nx x Ny x No).

Parameters:
  • rho (Tensor)

  • t (float)

Return type:

Tensor

abstractmethod rho_dot(rho, t, patch_id)

Return material contribution to drho/dt. This should include scattering and any coherent evolution in band space.

Parameters:
  • rho (Tensor)

  • t (float)

  • patch_id (int)

Return type:

Tensor

E: Tensor

nk_mine x n_bands energies

comm: Comm

Communicator for reciprocal-space split over k

dt_max: float

maximum stable time-step (set to inf if not available)

k: Tensor

nk_mine x n_dim wave vectors

k_division: TaskDivision

Division of k-points over MPI

k_mine: slice

slice of k on current process

n_bands: int

number of bands at each k

n_dim: int

dimensionality of material (2 or 3)

nk_mine: int

number of k-points on current process

rho0: Tensor

nk_mine x n_bands x n_bands initial density matrix

property transport_velocity: Tensor

Effective velocity for each density-matrix component. This always has dimensions (nk_mine * (n_bands**2)) x 2.

v: Tensor

nk_mine x n_bands x n_dim velocities in plane

wk: float

Brillouin zone integration weight