qimpy.transport.geometry.ParameterGrid
- class ParameterGrid(*, material, shape, dimension1=None, dimension2=None, save_rho=False, process_grid, checkpoint_in=(None, ''))
Bases:
GeometryGeometry specification.
- Parameters:
material (Material)
shape (tuple[int, int])
dimension1 (Optional[dict[str, dict[str, TensorCompatible]]])
dimension2 (Optional[dict[str, dict[str, TensorCompatible]]])
save_rho (bool)
process_grid (ProcessGrid)
checkpoint_in (CheckpointPath)
- __init__(*, material, shape, dimension1=None, dimension2=None, save_rho=False, process_grid, checkpoint_in=(None, ''))
Initialize parameter grid parameters.
- Parameters:
shape (Sequence[int]) – [Input file] Dimensions of parameter grid (always 2D).
dimension1 (dict[str, dict[str, Tensor | ndarray | float | Sequence[float]]] | None) – [Input file] Parameter names and values to sweep along dimension 1. The values can be specified with “loop” over explicit values, or “sweep” linearly from the initial to the final value.
dimension2 (dict[str, dict[str, Tensor | ndarray | float | Sequence[float]]] | None) – [Input file] Parameter names and values to sweep along dimension 2. Specification is the same as for dimension1.
save_rho (bool) – [Input file] Whether to write the full density matrices to the checkpoint file. If not (default), only observables are written to the checkpoint file.
material (Material)
process_grid (ProcessGrid)
checkpoint_in (CheckpointPath)
- Return type:
None
Methods
Initialize parameter grid parameters.
add_childConstruct child object self.`attr_name` of type cls.
add_child_one_ofInvoke add_child on one of several child options in args.
create_valuesReturn list of drho/dt corresponding to each rho at time t.
save_checkpointSave self and all children in hierarchy to cp_path.
update_stashStash results for current step for a future save_checkpoint call.
Attributes
rhoGet current values of density matrices.
Dimensions of parameter grid
Parameters broadcastable with grid
commCommunicator for real-space split over patches
materialCorresponding material
grid_spacingGrid spacing used for discretization
contactsSVG contact names to material parameters
quad_setOriginal geometry specification from SVG
sub_quad_setDivision into smaller quads for tuning parallelization
patchesAdvection for each quad patch local to this process
patch_divisionDivision of patches over comm
stashSaved results for collating into fewer checkpoints
dt_maxMaximum stable time step
save_rhowhether to write rho to checkpoint file
cent_diff_derivchild_namesNames of attributes with child objects.
variant_nameVersion of children having variants (if any)
- rho_dot(rho, t)
Return list of drho/dt corresponding to each rho at time t.
- Parameters:
rho (TensorList)
t (float)
- Return type:
- parameters: dict[str, torch.Tensor]
Parameters broadcastable with grid
- shape: tuple[int, int]
Dimensions of parameter grid