Module qdyn_def_mod

This module defines the data structures. It also collects a large number of automatically generated routines for handling these data structures.

Summary

Types:

bwr_pt

Config file parameters for bandwidth restriction in OCT.

channel_t

Description of a single scattering channel.

dissipator_pt

Parameters for the dissipation in the config file.

dyn_generator_t

Numerical representation of a dynamical generator.

eigensys_block_t

Eigensystem of a single surface/block of coupled surfaces.

eigensystem_pt

Config file parameters for eigensystem calculation.

eigensystem_t

Eigensystem information of full Hamiltonian.

grid_dim_t

Spatial grid in a specific dimension.

grid_op_t

Representation of an operator that is defined on a spatial grid.

grid_pt

Information about spatial grid in the config file.

grid_t

Collection of spatial grids for the different dimensions.

ham_pt

Config file description of the Hamiltonian.

ham_t

Numerical representation of a Hamiltonian.

ham_work_t

Internal data storage used in the application of the Hamiltonian.

hook_data_t

Extra data for built-in propagation hooks.

inhom_cheby_coeffs_t

Container for inhomogeneous Chebychev coefficients.

is_set_bwr_t

Flags to indicate whether the items in the section bwr are set explicitly in the config file or not.

is_set_dissipator_t

Flags to indicate whether the items in the section dissipator are set explicitly in the config file or not.

is_set_eigensystem_t

Flags to indicate whether the items in the section eigensystem are set explicitly in the config file or not.

is_set_grid_t

Flags to indicate whether the items in the section grid are set explicitly in the config file or not.

is_set_ham_t

Flags to indicate whether the items in the section ham are set explicitly in the config file or not.

is_set_observables_t

Flags to indicate whether the items in the section observables are set explicitly in the config file or not.

is_set_oct_t

Flags to indicate whether the items in the section oct are set explicitly in the config file or not.

is_set_prop_t

Flags to indicate whether the items in the section prop are set explicitly in the config file or not.

is_set_psi_t

Flags to indicate whether the items in the section psi are set explicitly in the config file or not.

is_set_pulse_t

Flags to indicate whether the items in the section pulse are set explicitly in the config file or not.

is_set_scattering_t

Flags to indicate whether the items in the section scattering are set explicitly in the config file or not.

is_set_sceint_t

Flags to indicate whether the items in the section sceint are set explicitly in the config file or not.

is_set_t

is_set_tgrid_t

Flags to indicate whether the items in the section tgrid are set explicitly in the config file or not.

krotov_work_t

Work data for Krotov’s method.

lbfgs_work_t

Collection of internal data for LBFGS optimization.

line_search_info_t

Basic information needed for performing a line search.

mcwf_work_t

Internal data for the Monte-Carlo Wave Function method.

observable_t

Specification of an observable, as part of prop_work_exp_t.

observables_pt

Config file parameters for observables.

oct_info_t

Keeps track of OCT convergence information and functionals.

oct_pt

Config file parameters for OCT.

oct_target_t

Optimization objective for OCT.

op_matrix_t

Operator in explicit matrix form.

op_memoize_t

Cache for operator data.

op_rational_memoize_t

Cache for potential operators of type 'rational'.

para_t

Collection of config file parameters in all sections.

prop_pt

Config file parameters for propagation.

prop_seg_storage_t

Storage container for a series of propagated states.

prop_seg_t

Single storage segment, component of prop_seg_storage_t.

prop_work_exp_t

Internal data for calculation of expectation values.

prop_work_t

Collection of internal data for propagation.

psi_pt

Specification of a wave function.

pulse_coupling_t

Describes the coupling of any operator to a set of pulses \(\{\epsilon_{k}(t)\}\).

pulse_distortion_t

General type extension for distorted pulses.

pulse_oct_t

Collection of optimization data for a pulse.

pulse_pt

Config file information of a single pulse.

pulse_t

Numerical pulse.

scattering_pt

Config file parameters for scattering calculations.

scattering_work_t

Collection of internal data and work arrays for scattering calculations.

sce_int_grid_t

Contains the electron integrals in a FEDVR and Sph Harm basis.

sce_int_orb_t

Contains the orbital representation of the integrals of a many e- system.

sceint_pt

Config file parameters for electronic integrals.

spa_work_t

Collection of internal data for SPa optimization.

sparse_ctensor_t

Sparse representation of an arbitrary rank complex Tensor.

sparse_tensor_t

Sparse representation of an arbitrary rank real Tensor.

sph_harm_t

Contains the dimensions of orbital and magnetic quantum numbers for the multipole expansion.

spin_couplings_t

Data structure containing all information for the total spin operator.

spin_index_t

Spin index variable listing allowed spin configurations.

spin_op_t

Variable containing all the information about a single spin operator.

spline_t

Data structure for splining data.

state_t

Numerical representation of a state (wave function or density matrix).

target_storage_t

Storage used in the optimization of a OCT target.

tgrid_pt

Config file information of the global time grid.

user_pt

User defined config data (in dictionary format).

vmi_image_t

Stores image data for a single velocity map image.

vmi_info_t

Stores information about a single velocity map image.

vmi_t

Collection of velocity map images.

work_cardinalbase_t

Collection of work arrays for application of the kinetic operator in the cardinal basis.

work_channels_t

Collection of internal data for setting up scattering channels.

work_cheby_t

Collection of internal data for Chebychev propagation.

work_dvr_legendre_t

Internal data for applying the kinetic operator for rotational degrees of freedom.

work_exact_t

Collection of internal data for exact propagation (i.e. via diagonalization).

work_expbase_t

Collection of work arrays for application of the kinetic operator in the exponential basis.

work_inhom_t

Collection of internal data for inhomogeneous propagation.

work_momentum_ops_t

Collection of work arrays for the application of momentum space operators.

work_movgrid_t

Scratch space for propagating with a moving basis.

work_newton_t

Collection of internal data for Newton propagation.

work_nito_t

Work data for newITO (new version, currently only Newton).

work_numerov_t

Collection of internal data and work arrays for Numerov method.

work_rk45_t

Collection of internal data for Runge-Kutta-Propagation.

work_sinbase_t

Collection of work arrays for application of the kinetic operator in the sin/cos basis.

Routines:

G0()

Function returning \(\op{G_0} \cdot\) state, where \(G_0\) is the time-independent part of the dynamical generator..

Ginhom()

Function returning \(s(t)\), where s is the time-dependent inhomogeneity of the dynamical generator..

Gt()

Function returning \(\op{V_t} \cdot\) state, where \(V_t\) is the time-dependent part of the dynamical generator..

clone_op_matrix_t_safe()

Debug a variable of type op_matrix_t safely, by setting checked=.false.

debug_carray()

Print a one-line debug representation of the given array.

debug_derived_array()

Print a one-line debug representation of an array of derived type with the given specifications.

debug_iarray()

Print a one-line debug representation of the given array.

debug_ilng_array()

Print a one-line debug representation of the given array.

debug_larray()

Print a one-line debug representation of the given array.

debug_rarray()

Print a one-line debug representation of the given array.

debug_sarray()

Print a one-line debug representation of the given array.

dump_ascii_carray()

Write a dump of the given array to the given out_unit.

dump_ascii_iarray()

Write a dump of the given array to the given out_unit.

dump_ascii_ilng_array()

Write a dump of the given array to the given out_unit.

dump_ascii_larray()

Write a dump of the given array to the given out_unit.

dump_ascii_rarray()

Write a dump of the given array to the given out_unit.

dump_ascii_sarray()

Write a dump of the given array to the given out_unit.

f_dep_func()

Function interface describing the analytical functional dependency of an operator to a set of pulses..

pulse_func()

Function for analytical description of the pulse.

read_dumped_ascii_carray()

Read in an ascii-dump of the given array, from the given in_unit.

read_dumped_ascii_iarray()

Read in an ascii-dump of the given array, from the given in_unit.

read_dumped_ascii_ilng_array()

Read in an ascii-dump of the given array, from the given in_unit.

read_dumped_ascii_larray()

Read in an ascii-dump of the given array, from the given in_unit.

read_dumped_ascii_rarray()

Read in an ascii-dump of the given array, from the given in_unit.

read_dumped_ascii_sarray()

Read in an ascii-dump of the given array, from the given in_unit.

Interfaces:

assignment()

No summary available

clone()

Clone a QDYN-type variable.

debug()

Debug a QDYN-type variable.

delete()

Delete a QDYN-type variable.

dump()

Dump a QDYN-type variable to a binary file.

dump_array()

Dump an array of QDYN-type variables to a open binary file.

dump_ascii()

Dump a QDYN-type variable to an ASCII file.

dump_ascii_array()

Dump an array of QDYN-type variables to an open ASCII file.

read_dumped()

Read a QDYN-type variable from a dumped binary file.

read_dumped_array()

Read an array of QDYN-type variables from a dumped binary file.

read_dumped_ascii()

Read a QDYN-type variable from a dumped ASCII file.

read_dumped_ascii_array()

Read an array of QDYN-type variables from a dumped ascii file.

Exports:

Reference

type  qdyn_def_mod/bwr_pt[source]

Config file parameters for bandwidth restriction in OCT.

Type fields
  • % omega :: real(idp) — Array of center frequencies for restriction

  • % width :: real(idp) — Array of width for restriction

  • % lambda :: real(idp) — Array of scaling factors (lambdas) for restriction

type  qdyn_def_mod/channel_t[source]

Description of a single scattering channel.

Type fields
  • % i1 :: real(idp) — Nuclear spin of 1st atom

  • % mi1 :: real(idp)\(z\)-projection of nuclear spin of 1st atom

  • % i2 :: real(idp) — Nuclear spin of 2nd atom

  • % mi2 :: real(idp)\(z\)-projection of nuclear spin of 2nd atom

  • % s1 :: real(idp) — Electronic spin of 1st atom

  • % ms1 :: real(idp)\(z\)-projection of electronic spin of 1st atom

  • % s2 :: real(idp) — Electronic spin of 2nd atom

  • % ms2 :: real(idp)\(z\)-projection of electronic spin of 2nd atom

  • % l :: integer — Head-to-tail angular momentu

  • % ml :: integer\(z\)-projection of the mechanical angular momentum

  • % surf :: integer — Index of the potential energy surface associated with this channel in the Hamiltonian

  • % is_open :: logical.true. for open channel (i.e. if channel asymptote is below the collision energy), .false. for closed channel

  • % E0 :: real(idp) — Asymptotic energy of the channel

type  qdyn_def_mod/dissipator_pt[source]

Parameters for the dissipation in the config file.

Type fields
  • % type :: character(len=atype_l) — Label indicating if dealing with multiple Lindblad operators or a single superoperator {‘lindblad_ops’|’dissipator’}

  • % label :: character(len=label_l) — Label or system the dissipator belongs to

  • % filename :: character(len=file_l) — Name of the file from where to take the dissipator

  • % pulse_id :: integer — ID of pulse in the pulse array the operator is assigned to, zero if not connected to a pulse

  • % n_photons :: integer — Number of photons involved in the operator by the pulse [1]

  • % conjg_pulse :: logical — If True, couple to the complex conjugate of the pulse instead of the original pulse value

  • % conv_to_superop :: logical — If .true., create a superoperator from the given array of Lindblad operators. Must have the same value for all Lindblad operators [.true.]

  • % add_to_H_jump :: character(len=sparsity_model_l) — If defined, add a non-Hermitian decay term \(-\frac{i}{2} \sum_n \Op{L}_n^{\dagger} \Op{L}_n\) to the Hamiltonian, where \(\{\Op{L}_n\}\) are the Lindblad operators. The value of add_to_H_jump is the sparsity model to be used for the extra term. Must have the same value for all Lindblad operators. May only be be defined if conv_to_superop is .false.. If add_to_H_jump is not defined, but the quantum jump method should be used (use_mcwf in the prop section of the config file), it is the user’s responsibility to ensure that the Hamiltonian is the appropriate “effective” Hamiltonian for the MCWF method. {‘banded’|’indexed’|’full’}

  • % expand_hermitian :: logical — If true, data in input file (filename) is assumed to contain data only for the upper or lower triangle. The other triangle will be initialized as the complex conjugate.

  • % real_op :: logical — If true and type is 'dissipator', the superoperator matrix is assumed to consist of only real values [.true.]

  • % op_unit :: character(len=unit_l) — If type is 'dissipator', unit the superoperator is given in. If type is 'lindblad_ops', unit the lindblad operator is in [‘iu’]

  • % sparsity_model :: character(len=sparsity_model_l) — Sparsity model to use for initializing and storing the given dissipator or Lindblad operator {‘banded’|’indexed’|’full’}

type  qdyn_def_mod/dyn_generator_t[source]

Numerical representation of a dynamical generator.

This can be a Liouvillian, if dealing with open quantum systems, or simply a Hamiltonian.

Type fields
  • % ham :: ham_t — Hamiltonian of the system

  • % lindblad_ops(:) :: op_matrix_t — Array of Lindblad operators

  • % dissipators(:) :: op_matrix_t — Superoperator describing dissipation

  • % adj_dissipators(:) :: op_matrix_t — Adjoint version of array dissipators

type  qdyn_def_mod/eigensys_block_t[source]

Eigensystem of a single surface/block of coupled surfaces.

Type fields
  • % eigenstates(:) :: state_t — Array of (normalized) eigenstates

  • % eigenvals(:) :: complex(idp) — Array of eigenvalues belonging to the eigenstates. The eigenvalues are calculated relative to the value of E_bound. The eigenvalues are shifted so that values below zero are bound in the BO potential, values above zero are unbound, independently of the potential’s asymptote. If the Hamiltonian is Hermitian, as it should be, the eigenvalues will be real (i.e. the imaginary part will be zero). However, with imaginary potentials and/or complex pulses the eigen_vals can become complex.

  • % bound :: integer — Number of eigenvals < 0

  • % E_bound :: real(idp) — Reference energy for calculating bound eigenvalues. For molecular potentials it is the energy of the lowest atomic (asymptotic) state. If the spin-orbit coupling is present, the atomic (asymptotic) states are obtained by diagonalizing the full atomic (asymptotic) Hamiltonian. For harmonic potentials the minimum of the potential is used as the reference energy.

type  qdyn_def_mod/eigensystem_pt[source]

Config file parameters for eigensystem calculation.

Type fields
  • % label :: character(len=label_l) — Label or system for the eigensystem

  • % write_dump :: character(len=file_l) — If given, dump the eigensystem into this file

  • % read_dump :: character(len=file_l) — If given, read the eigensystem from this file

  • % pulse_val_i :: integer — Pulse time index for which to create the eigensystem. Defaults to 0 (field-free Hamiltonian)

  • % nev_fac :: real(idp) — The fraction of the total number of grid points to be obtained as eigenvalue after diagonalization

  • % nev :: integer — Number of eigenvalues after diagonalization

  • % diagtype :: character(len=diagtype_l) — Region to diagonalize (only if maptype=='inner_outer') {‘only_inner’|’only_outer’|’both’}

type  qdyn_def_mod/eigensystem_t[source]

Eigensystem information of full Hamiltonian.

The Hamiltonian must be block diagonal.

Type fields
  • % blocks(:) :: eigensys_block_t — Array over the different surfaces/coupled surface blocks in the Hamiltonian

  • % coupled :: logical — Does the Hamiltonian contain spin-orbit couplings? If no, the size of blocks is equal to the number of surfaces.

type  qdyn_def_mod/grid_dim_t[source]

Spatial grid in a specific dimension.

Type fields
  • % r(:) :: real(idp) — Array of \(r\)-values on the grid

  • % k(:) :: real(idp) — Array of \(k\)-values on the grid

  • % J(:) :: real(idp) — Jacobian to translate between physical grid and working grid, when mapping is used

  • % weights(:) :: real(idp) — Arrays of Gauss-Legendre weights for angular coordinates

  • % dvr_matrix(:,:) :: real(idp) — Unitary transformation matrix between the DVR and FBR representations

  • % dr :: real(idp) — Grid spacing (after mapping: spacing of working grid)

  • % dk :: real(idp)\(k\)-spacing

  • % k_max :: real(idp) — Maximum value of \(k\)

  • % full_r_max :: real(idp) — Maximum value of radial grid before removing the first and last point for Dirichlet Condions. Needed for solving the Poisson Equation in electr calc.

  • % mapped :: logical — Whether or not a mapped grid is used in this spatial coordinate

  • % maptype :: character(len=maptype_l) — If mapped is .true., type of mapping

  • % nl :: integer — When using cardinal grid, \(nl + 1\) is the number of grid points in each element

  • % m :: integer — When using cardinal grid, \(m\) is the number of elements

  • % jac(:) :: real(idp) — Jacobian for the cardinal grid

  • % gllp(:) :: real(idp) — Legendre-Gauss-Lobatto points in \([-1,1]\)

  • % gllw(:) :: real(idp) — Gaussian weights in \([-1,1]\) for Gauss-Lobatto grid

  • % D_primitive(:,:) :: real(idp) — For cardinal grid, Kinetic matrix representation in \([-1,1]\)

type  qdyn_def_mod/grid_op_t[source]

Representation of an operator that is defined on a spatial grid.

Type fields
  • % a(:) :: real(idp)\(r\)-dependent values of the operator

  • % a_0 :: real(idp) — Reference value of the operator. For molecular potential it is the asymptotic value and for non-BO-type potentials (e.g. 'hamos') it is mininum value instead

  • % pos(2) :: integer — the numbers of the two surfaces that are affected by the operator (can be equal e.g. in the case of a potential)

  • % atype :: character(len=atype_l) — Kind of operator: dip, pot, ipot, jpot, so, cwlaser, stark or dstark

  • % map_to_j :: integer — If atype is potential contains the value of the rotational quantum number \(j\) of the wavefunction on which the potential will act

  • % cos_theta :: logical — True if the operator should also act on the \(\theta\)-dimension, according to \(\cos(\theta)\)

  • % velocity_gauge :: logical — True if the operator should couple to the pulse in the velocity gauge instead of the length gauge, i.e. the pulse is in fact a vector potential [.false.]

  • % symmetric :: logical — True if the operator also applies to the reverse surfaces given in pos

  • % deriv_before :: logical — Before applying the operator, apply \(\dd/\dd{}x\)

  • % spinindex :: spin_index_t — Spin index data structure containing information about allowed spin configurations for an interaction of this operator with a bath of spins

  • % spinham :: spin_couplings_t — Spin part of the operator containing a collection of local and spin-spin interaction operators

  • % pcoup :: pulse_coupling_t — Data structure containing all information regarding the coupling of a pulse to the operator

type  qdyn_def_mod/grid_pt[source]

Information about spatial grid in the config file.

Currently, a Cartesian spatial interval is sampled by \(N =\) grid:nr grid points \(x_i\) with \(i=1,\dots,N\), where \(x_1 =\) r_min and \(x_N=\) r_max as shown below.

However, when using the sine base for the representation of wavefunctions, the discrete sine transformation is performed on the same interval, i.e. taking all grid points \(x_i\) into account. This means that the fixed node boundary conditions are applied at the points right outside the interval, i.e. \(x_0\) and \(x_{N+1}\). Hence, your implicitly assumed box is actually larger by two points ranging from \(x_0\) to \(x_{N+1}\) with length \(L = x_{N+1} - x_0\) and \(\psi(x_0) = \psi(x_{N+1}) = 0\):

        x(1)  x(2) ...               x(nx)
|  .     *     *     *     *     *     *     .  |
         ^                             ^
         x_min                         x_max

This may have implications for the calculation of the momentum grid and the implementation of operators which are special at the grid boundaries (e.g. the TFCAP).

Type fields
  • % label :: character(len=label_l) — Label or system to which the grid belongs

  • % dim :: integer — Index of the dimension (between 1 and 3) for which the grid is defined

  • % r_min :: real(idp) — Minimum \(r/\theta/\phi\)

  • % r_max :: real(idp) — Maximum \(r/\theta/\phi\)

  • % r_max1 :: real(idp) — Maximum \(r\) for B1 region (for inner_outer mapping)

  • % r_max2 :: real(idp) — Maximum \(r\) for B2 region (for inner_outer mapping)

  • % maptype :: character(len=maptype_l) — Type of mapping {‘diff’|’int’|’doubling’| ‘inner_outer’}

  • % read_envelope :: character(len=file_l) — If set to something other than '', read the mapping envelope potential from the given filename.

  • % write_envelope :: character(len=file_l) — If set to something other than '', write the mapping envelope potential to the given file.

  • % beta :: real(idp)\(\beta\) mapping factor

  • % E_max :: real(idp)\(E_{\max}\) mapping factor

  • % dr_max :: real(idp) — Maximum grid spacing when using mapping. [huge(zero)]

  • % nr :: integer — Numer of grid points

  • % npt :: integer — Number of points per de-Broglie wavelength for maptype doubling

  • % nl :: integer — When using cardinal grid, \(nl + 1\) is the number of grid points in each element

  • % m :: integer — When using cardinal grid, \(m\) is the number of elements

  • % m1 :: integer — When using cardinal grid, \(m_1\) is the number of elements in the B1 region (for inner_outer mapping)

  • % m2 :: integer — When using cardinal grid, \(m_2\) is the number of elements in the B2 region (for inner_outer mapping)

  • % moveable :: logical — Whether or not the grid should move

  • % coord_type :: character(len=coord_type_l) — Label for coordinate system {‘cartesian’|’gll’| ‘spherical’}

  • % spher_method :: character(len=method_l) — Name of the method to use for spherical coordinates {‘dvr’|’fbr’|’fbrgll’}

type  qdyn_def_mod/grid_t[source]

Collection of spatial grids for the different dimensions.

Type fields
  • % dim(:) :: grid_dim_t — Array of grids, per dimension

  • % moveable :: logical — Whether or not the grid should move with the wavefunction

  • % coord_type :: character(len=coord_type_l) — Label for the coordinate system: 'cartesian1D', 'cartesian2d', 'cartesian3d', 'spherical', 'cylindrical', 'polar'

  • % spher_method :: character(len=method_l) — Name of the Method to use for spherical coordinates ('dvr' or 'fbr' or 'fbrgll')

type  qdyn_def_mod/ham_pt[source]

Config file description of the Hamiltonian.

The Hamiltonian, as it appears in the Schrödinger equation, can be thought of as a sum of operators, where each operator may connect to a control pulse. Each line in the ham section in the config file describes one such operator. The type option distinguishes between different types of operators:

  • type='op': Operator defined over a spatial grid, for a specific energy surface / spin configuration. These are typically used to describe quantum-molecular models, using potential surfaces. The type of operator (potential, dipole, …) is then specified using the op_type parameter. Operators may be loaded from file (op_form=file) or using an analytical formula (other values of op_form)

  • type='mom_op': Like type='op', but acting in momenum space

  • type='matrix': A (sparse) matrix acting on the entire Hilbert space. This is typically used for models that are well-described in the energy basis (i.e., not using a spatial grid). The matrix entries must be read from file.

  • type='spin': An operator action purely on the spin degree of freedom, expressed in the Pauli-basis

Operators of any kind can be connected to a pulse by specifying a pulse_id that matches one of the pulse_id values in the pulses section of the config file. In most cases, the operator couples linearly to the pulse, but different types of operators may define their own conventions. For example an operator with op_type='stark' couples quadratically to the pulse. Furthermore setting n_photons to values greater one couples to higher powers of the pulse.

While Hamiltonians are generally Hermitian, this is not always the case. Using type='matrix', and arbitrary matrix could be loaded. Also the imag_op can be used to define e.g. imaginary potentials. Non-Hermitian Hamiltonians can be used to model loss. When using the quantum jump trajectory (MCWF) method to model dissipative dynamics, the effective Hamiltonian is non-Hermitian. Instead of using the add_to_H_jump option in the dissipators section of the config file, the effective Hamiltonian could be specified directly in the ham section (potentially allowing for more efficiency)

Type fields
  • % type :: character(len=atype_l) — String indicating type of operator described by the line {‘op’| ‘mom_op’|’matrix’|’spin’}

  • % label :: character(len=label_l) — Label or system the Hamiltonian belongs to

  • % op_type :: character(len=atype_l) — For entries of type='op' or type='mom_op', the type of operator represented by the line {‘pot’|’dip’|’so’| ‘cwlaser’|’stark’|’dstark’}

  • % op_form :: character(len=atype_l) — For operators described analytically, the name of the formula to be used. If operator is not described analytically, must take the value 'file', and the filename attribute must be set as well. For type='matrix', operators will be read from without setting op_form {‘morse’|’hamos’| ‘file’|’gauss’|’dipole’|’linear’|’const’| ‘halfhamos’|’tfcap’|’rotbarrier’|’top’}

  • % filename :: character(len=file_l) — If op_form='file', the filename from which to the operator. For operators on the grid, the file should contain the \(r\)-coordinate in the first column, and the value of the operator in the second column. For type='matrix', the file should contain three columns with the row-index (1-based integer), col-index, and real part of matrix, with a possible non-zero imaginary part in the fourth column.

  • % n_photons :: integer — Number of photons involved in the operator by the pulse. the pulse value is raised to the power specified by n_photons [1]

  • % conjg_pulse :: logical — If True, couple to the complex conjugate of the pulse instead of the original pulse value

  • % pulse_id :: integer — ID of pulse in the pulse array the operator is assigned to, zero if not connected to a pulse. Must match a pulse_id used in the pulses section of the config file

  • % real_op :: logical — If true and type='matrix', the operator matrix is assumed to consist of only real values [.true.]

  • % imag_op :: logical — If true, the operator is imaginary (multiplied by \(i\)). This is for grid-based operators, not for type='matrix'

  • % expand_hermitian :: logical — If true in conjunction with type='matrix', the input file (filename) is assumed to contain data only for the upper or lower triangle. The other triangle will be initialized as the complex conjugate. Must be false if connecting to a complex pulse.

  • % cos_theta :: logical — True if the operator should also act on the theta-dimension, according to cos(theta)

  • % velocity_gauge :: logical — True if the operator should couple to the pulse in the velocity gauge instead of the length gauge, i.e. the pulse is in fact a vector potential [.false.]

  • % r_unit :: character(len=unit_l) — For grid-based operator, if op_form='file', unit in which the spatial grid is given [‘iu’]

  • % op_unit :: character(len=unit_l) — For grid-based operator, if op_form='file', unit in which the operator is given. For type='matrix', unit of the data in filename [‘iu’]

  • % deriv_before :: logical — Before applying the operator, apply \(\dd/\dd{}x\)

  • % n_surf :: integer — Total number of surfaces (important for operator matrices)

  • % op_surf :: integer — For grid-based operators defined on a single surface (e.g. potentials), surface on which the operator acts

  • % op_surf_1 :: integer — For grid-based operators that couple two surfaces (e.g., dipoles) index of the first surface

  • % op_surf_2 :: integer — For grid-based operators that couple two surfaces (e.g., dipoles) index of the second surface

  • % V_max :: real(idp) — For analytic grid-based operators (op_form anything except 'file'), the maximum value of the operator. Any values larger than V_max will be truncated. [huge(zero)]

  • % V_min :: real(idp) — Like V_max, but for minimum of operator [-huge(zero)]

  • % w_0 :: real(idp) — If op_form is 'hamos', frequency of harmonic operator

  • % offset :: real(idp) — If op_form is 'hamos' or linear, x-offset of operator

  • % E_0 :: real(idp) — If op_form is 'hamos', minimum of operator. If op_form is 'const', constant value

  • % width :: real(idp) — If op_form is 'morse', width of Morse potential

  • % depth :: real(idp) — If op_form is 'morse' or gauss, depth of the operator

  • % laser_I :: real(idp) — If op_form is 'cwlaser', intensity of the cw laser

  • % lin_grad :: real(idp) — If op_form is 'linear', gradient of the operator

  • % fwhm :: real(idp) — If op_form is 'gauss', full-with-at-half-maximum of operator

  • % rshift :: real(idp) — If op_form is 'file', rotational barrier shift

  • % r_star :: real(idp) — If op_form is 'dipole', value of \(r^{*}\)

  • % C12 :: real(idp) — If op_form is 'dipole', strength of inner operator barrier

  • % C3 :: real(idp) — If op_form is 'dipole', strength of dipole operator

  • % E_min :: real(idp) — If op_form is 'tfcap', strength parameter. Lowest scattering energy of interest

  • % D :: real(idp) — If op_form is 'tfcap', absorption range. You either specify rc or D. If none of them is given, D is set equal to the de Broglie wavelength corresponding to E_min

  • % rc :: real(idp) — If op_form is 'halfhamos' or 'tfcap', start of half harmonic potential. For tfcap either rc or D can be given. Otherwise, D is set equal to the de Broglie wavelength corresponding to E_min

  • % eta :: real(idp) — If op_form is 'halfhamos', strength of half harmonic potential

  • % rat_r_0 :: real(idp) — If op_form is 'rational', expansion point of the rational function

  • % max_rotbarr :: real(idp) — Maximal value for the rotational barrier in the kinetic operator [huge(zero)]

  • % rotbarr_j :: integer — If op_form is 'rotbarrier', rotational quantum number. For scattering calculations with scattering:system equal to 'general', this is taken to be the partial wave quantum number of the channel.

  • % map_to_j :: integer — Contains the value of the rotational quantum number \(j\) of the wavefunction on which the potential will act [-1]

  • % no_splining :: logical — If true in combination with op_form = 'file', don’t interpolate the potential data in the file, but assume that it perfectly matches the grid

  • % no_asymptote_check :: logical — If true, for a potential surface read from file, the asymptotic value is allowed to differ from zero

  • % asym_SO :: real(idp) — Asymptotic value of a spin-orbit coupling (op_type='so')

  • % asym_stark :: real(idp) — Asymptotic value of a Stark shift (op_type='stark')

  • % n_spins :: integer — Total number of spins

  • % n_ex_min :: integer — Minimum number of allowed excitations for all spin configurations

  • % n_ex_max :: integer — Maximum number of allowed excitations for all spin configurations

  • % step_ex :: integer — Step width between one excitation number and the other (for consecutive ones is 1) [1]

  • % mirror_ex :: logical — Whether or not one wants to construct a SU(2) symmetric spin index

  • % int_model :: character(len=spinmodel_l) — Model of two body interaction {‘000’|’X’|’Y’| ‘Z’|’XY’|’XX’|’XXZ’|’XYZ’}

  • % is_periodic :: logical — If true, spin-spin couplings are periodic along each direction

  • % filename_int :: character(len=file_l) — Name of file containing the parameters for initializing the spin-spin couplings

  • % filename_spinops :: character(len=file_l) — Name of file containing all spin operators

  • % mass :: real(idp) — Mass of atom/molecule for the kinetic operator [one]

  • % A :: real(idp) — Rigid rotor rotational constant for principal axis a

  • % B :: real(idp) — Rigid rotor rotational constant for principal axis b

  • % C :: real(idp) — Rigid rotor rotational constant for principal axis c

  • % mu_a :: real(idp) — Dipole moment component along axis a

  • % mu_b :: real(idp) — Dipole moment component along axis b

  • % mu_c :: real(idp) — Dipole moment component along axis c

  • % pulse_pol :: character(len=label_l) — For op_type='dip' and op_form='top', polarisation of the pulses that this operator couples to {‘x’| ‘y’|’z’}

  • % jmax :: integer — Maximum rotational quantum number for which to build operators of a symmetric or asymmetric top molecule

  • % sort_by_energy :: logical — If op_form='top' and op_type='pot', sort states by energy instead of rotational quantum numbers. Will be ignored when used together with levelfile.

  • % levelfile :: character(len=file_l) — Name of file specifying the levels that shall be selected from rotational Hamiltonian, taking into account \(M\) degeneracy. The file is assumed to contain values for \(j\) in the first column and the values for \(\tau\) in the second column.

  • % kin_base :: character(len=base_l) — Basis states to use for expansion of wave functions {‘sin’|’exp’|’cardinal’}

  • % specrad_method :: character(len=method_l) — Default method to use for calculating the spectral radius {‘arnoldi’|’diag’|’molecular’}

  • % sparsity_model :: character(len=sparsity_model_l) — If type is 'matrix', sparsity model to use for initializing and storing the given operator matrix {‘banded’|’indexed’|’full’}

  • % memoize_ops :: logical — Use memoization feature for operator data. This can speed up calculations with a moving grid considerably

  • % subspace :: character(len=op_subspace_l) — If type is 'matrix', this string defines the subspace of the wave function psi of state_t on which the operator matrix acts, i.e., the five dimensions associate with three spatial dimension, one spin dimension and the surface dimension {‘spat1’| ‘spat2’|’spat3’|’spin’|’surf’|’total’} [‘total’]

  • % energy_cutoff :: real(idp) — The energy above which the Hamiltonian is cut off via stiffness removal [huge(zero)]

type  qdyn_def_mod/ham_t[source]

Numerical representation of a Hamiltonian.

Type fields
  • % kinop :: logical — Logical indicating whether the standard kinetic operator should be applied. Must not be .true. if there is no spatial grid.

  • % ops(:) :: grid_op_t — Array of operators in coordinate space (potentials, dipoles, etc.)

  • % momentum_ops(:) :: grid_op_t — Operators in momentum space. Exactly like op, but before applying the operators, the state must be transformed into momentum space.

  • % op_matrices(:) :: op_matrix_t — Array of Hamiltonians in matrix form, each of which may or may not be connected to a control. For example, \(H = H_0 + e(t) H_1\) would be expressed by storing the matrix \(H_0\) and the matrix \(H_1\) in op_matrices.

  • % op_matrices_adjoint(:) :: op_matrix_t — Copy of op_matrices, storing the Hermitian conjugate of each matrix

  • % J :: spin_couplings_t — Parameter containg all informations for spin couplings

  • % mass :: real(idp) — Mass to be used in the application of the kinetic operator

  • % base :: character(len=base_l) — Name of the base to use in the kinetic operator ('exp', 'sin' or 'cardinal')

  • % index :: spin_index_t — Index of spin configurations

  • % wrk :: ham_work_t — Internal storage used in application of kinetic operator

  • % nsurf :: integer — number of surfaces that the Hamiltonian works on

  • % emin :: real(idp) — Mininum eigenvalue of the Hamiltonian

  • % de :: real(idp) — Spectral radius. If you change this manually, remember to recalculate the Chebychev coefficients

  • % max_rotbarr :: real(idp) — Maximal value for the rotational barrier in the kinetic operator [huge(zero)]

  • % label :: character(len=label_l) — Label or system the Hamiltonian belongs to

  • % specrad_method :: character(len=method_l) — Default method to use for calculating the spectral radius ('arnoldi', 'diag', or 'molecular')

  • % energy_cutoff :: real(idp) — The energy above which the Hamiltonian is cut off via stiffness removal

  • % stiffness_projector(:) :: state_t — Array of states which span the projector \(P\) to transform the Hamiltonian according to \(\tilde{H} = (1-P) H (1-P)\). (Usually used to remove stiffness by reducing the spectral radius by using high-energy eigenstates.)

  • % projector_index(:) :: integer — The index l of the psi array to which the respective state array in projector belongs

  • % rwa :: logical — Flag to indicate whether the Hamiltonian is valid in the rotating wave approximation

type  qdyn_def_mod/ham_work_t[source]

Internal data storage used in the application of the Hamiltonian.

Type fields
  • % wdvr_legendre :: work_dvr_legendre_t — Internal data for DVR method

  • % wexpbase :: work_expbase_t — Internal data for exp expansion (kinetic operator)

  • % wsinbase :: work_sinbase_t — Internal data for sine/cosine expansion (kinetic operator)

  • % wmomops :: work_momentum_ops_t — Temporary states necessary in application of momentum space operators

  • % wcardinalbase :: work_cardinalbase_t — Internal data for cardinal basis

type  qdyn_def_mod/hook_data_t[source]

Extra data for built-in propagation hooks.

Type fields
  • % filename :: character(len=file_l) — Filename for output file

  • % time_unit :: character(len=unit_l) — The unit in which to report time value

  • % states_file_format :: character(len=states_file_format_l) — The file_format parameter for write_states

  • % states_to_lab :: logical — If .true., states should be converted from the the rotating frame to the lab frame

  • % plot_stride :: integer — Time grid stride for plotting

type  qdyn_def_mod/inhom_cheby_coeffs_t[source]

Container for inhomogeneous Chebychev coefficients.

We need such a container because we will need to store coefficients for several orders of \(F_m\), and thus need an array of coefficient arrays.

Type fields
  • % c(:) :: complex(idp) — Array of complex Chebychev coefficients

  • % fft_scratch(:) :: complex(idp) — FFT scratch space

  • % n_cheby :: integer — Number of coefficients that need to be included in the series to converge to machine precision. Only elements c(0:n_cheby-1) should be referenced

type  qdyn_def_mod/is_set_bwr_t[source]

Flags to indicate whether the items in the section bwr are set explicitly in the config file or not

Type fields
  • % omega :: logical — Is bwr%omega set in para?

  • % width :: logical — Is bwr%width set in para?

  • % lambda :: logical — Is bwr%lambda set in para?

type  qdyn_def_mod/is_set_dissipator_t[source]

Flags to indicate whether the items in the section dissipator are set explicitly in the config file or not

Type fields
  • % type :: logical — Is dissipator%type set in para?

  • % label :: logical — Is dissipator%label set in para?

  • % filename :: logical — Is dissipator%filename set in para?

  • % pulse_id :: logical — Is dissipator%pulse_id set in para?

  • % n_photons :: logical — Is dissipator%n_photons set in para?

  • % conjg_pulse :: logical — Is dissipator%conjg_pulse set in para?

  • % conv_to_superop :: logical — Is dissipator%conv_to_superop set in para?

  • % add_to_H_jump :: logical — Is dissipator%add_to_H_jump set in para?

  • % expand_hermitian :: logical — Is dissipator%expand_hermitian set in para?

  • % real_op :: logical — Is dissipator%real_op set in para?

  • % op_unit :: logical — Is dissipator%op_unit set in para?

  • % sparsity_model :: logical — Is dissipator%sparsity_model set in para?

type  qdyn_def_mod/is_set_eigensystem_t[source]

Flags to indicate whether the items in the section eigensystem are set explicitly in the config file or not

Type fields
  • % label :: logical — Is eigensystem%label set in para?

  • % write_dump :: logical — Is eigensystem%write_dump set in para?

  • % read_dump :: logical — Is eigensystem%read_dump set in para?

  • % pulse_val_i :: logical — Is eigensystem%pulse_val_i set in para?

  • % nev_fac :: logical — Is eigensystem%nev_fac set in para?

  • % nev :: logical — Is eigensystem%nev set in para?

  • % diagtype :: logical — Is eigensystem%diagtype set in para?

type  qdyn_def_mod/is_set_grid_t[source]

Flags to indicate whether the items in the section grid are set explicitly in the config file or not

Type fields
  • % label :: logical — Is grid%label set in para?

  • % dim :: logical — Is grid%dim set in para?

  • % r_min :: logical — Is grid%r_min set in para?

  • % r_max :: logical — Is grid%r_max set in para?

  • % r_max1 :: logical — Is grid%r_max1 set in para?

  • % r_max2 :: logical — Is grid%r_max2 set in para?

  • % maptype :: logical — Is grid%maptype set in para?

  • % read_envelope :: logical — Is grid%read_envelope set in para?

  • % write_envelope :: logical — Is grid%write_envelope set in para?

  • % beta :: logical — Is grid%beta set in para?

  • % E_max :: logical — Is grid%E_max set in para?

  • % dr_max :: logical — Is grid%dr_max set in para?

  • % nr :: logical — Is grid%nr set in para?

  • % npt :: logical — Is grid%npt set in para?

  • % nl :: logical — Is grid%nl set in para?

  • % m :: logical — Is grid%m set in para?

  • % m1 :: logical — Is grid%m1 set in para?

  • % m2 :: logical — Is grid%m2 set in para?

  • % moveable :: logical — Is grid%moveable set in para?

  • % coord_type :: logical — Is grid%coord_type set in para?

  • % spher_method :: logical — Is grid%spher_method set in para?

type  qdyn_def_mod/is_set_ham_t[source]

Flags to indicate whether the items in the section ham are set explicitly in the config file or not

Type fields
  • % type :: logical — Is ham%type set in para?

  • % label :: logical — Is ham%label set in para?

  • % op_type :: logical — Is ham%op_type set in para?

  • % op_form :: logical — Is ham%op_form set in para?

  • % filename :: logical — Is ham%filename set in para?

  • % n_photons :: logical — Is ham%n_photons set in para?

  • % conjg_pulse :: logical — Is ham%conjg_pulse set in para?

  • % pulse_id :: logical — Is ham%pulse_id set in para?

  • % real_op :: logical — Is ham%real_op set in para?

  • % imag_op :: logical — Is ham%imag_op set in para?

  • % expand_hermitian :: logical — Is ham%expand_hermitian set in para?

  • % cos_theta :: logical — Is ham%cos_theta set in para?

  • % velocity_gauge :: logical — Is ham%velocity_gauge set in para?

  • % r_unit :: logical — Is ham%r_unit set in para?

  • % op_unit :: logical — Is ham%op_unit set in para?

  • % deriv_before :: logical — Is ham%deriv_before set in para?

  • % n_surf :: logical — Is ham%n_surf set in para?

  • % op_surf :: logical — Is ham%op_surf set in para?

  • % op_surf_1 :: logical — Is ham%op_surf_1 set in para?

  • % op_surf_2 :: logical — Is ham%op_surf_2 set in para?

  • % V_max :: logical — Is ham%V_max set in para?

  • % V_min :: logical — Is ham%V_min set in para?

  • % w_0 :: logical — Is ham%w_0 set in para?

  • % offset :: logical — Is ham%offset set in para?

  • % E_0 :: logical — Is ham%E_0 set in para?

  • % width :: logical — Is ham%width set in para?

  • % depth :: logical — Is ham%depth set in para?

  • % laser_I :: logical — Is ham%laser_I set in para?

  • % lin_grad :: logical — Is ham%lin_grad set in para?

  • % fwhm :: logical — Is ham%fwhm set in para?

  • % rshift :: logical — Is ham%rshift set in para?

  • % r_star :: logical — Is ham%r_star set in para?

  • % C12 :: logical — Is ham%C12 set in para?

  • % C3 :: logical — Is ham%C3 set in para?

  • % E_min :: logical — Is ham%E_min set in para?

  • % D :: logical — Is ham%D set in para?

  • % rc :: logical — Is ham%rc set in para?

  • % eta :: logical — Is ham%eta set in para?

  • % rat_r_0 :: logical — Is ham%rat_r_0 set in para?

  • % max_rotbarr :: logical — Is ham%max_rotbarr set in para?

  • % rotbarr_j :: logical — Is ham%rotbarr_j set in para?

  • % map_to_j :: logical — Is ham%map_to_j set in para?

  • % no_splining :: logical — Is ham%no_splining set in para?

  • % no_asymptote_check :: logical — Is ham%no_asymptote_check set in para?

  • % asym_SO :: logical — Is ham%asym_SO set in para?

  • % asym_stark :: logical — Is ham%asym_stark set in para?

  • % n_spins :: logical — Is ham%n_spins set in para?

  • % n_ex_min :: logical — Is ham%n_ex_min set in para?

  • % n_ex_max :: logical — Is ham%n_ex_max set in para?

  • % step_ex :: logical — Is ham%step_ex set in para?

  • % mirror_ex :: logical — Is ham%mirror_ex set in para?

  • % int_model :: logical — Is ham%int_model set in para?

  • % is_periodic :: logical — Is ham%is_periodic set in para?

  • % filename_int :: logical — Is ham%filename_int set in para?

  • % filename_spinops :: logical — Is ham%filename_spinops set in para?

  • % mass :: logical — Is ham%mass set in para?

  • % A :: logical — Is ham%A set in para?

  • % B :: logical — Is ham%B set in para?

  • % C :: logical — Is ham%C set in para?

  • % mu_a :: logical — Is ham%mu_a set in para?

  • % mu_b :: logical — Is ham%mu_b set in para?

  • % mu_c :: logical — Is ham%mu_c set in para?

  • % pulse_pol :: logical — Is ham%pulse_pol set in para?

  • % jmax :: logical — Is ham%jmax set in para?

  • % sort_by_energy :: logical — Is ham%sort_by_energy set in para?

  • % levelfile :: logical — Is ham%levelfile set in para?

  • % kin_base :: logical — Is ham%kin_base set in para?

  • % specrad_method :: logical — Is ham%specrad_method set in para?

  • % sparsity_model :: logical — Is ham%sparsity_model set in para?

  • % memoize_ops :: logical — Is ham%memoize_ops set in para?

  • % subspace :: logical — Is ham%subspace set in para?

  • % energy_cutoff :: logical — Is ham%energy_cutoff set in para?

type  qdyn_def_mod/is_set_observables_t[source]

Flags to indicate whether the items in the section observables are set explicitly in the config file or not

Type fields
  • % type :: logical — Is observables%type set in para?

  • % label :: logical — Is observables%label set in para?

  • % outfile :: logical — Is observables%outfile set in para?

  • % exp_unit :: logical — Is observables%exp_unit set in para?

  • % time_unit :: logical — Is observables%time_unit set in para?

  • % column_label :: logical — Is observables%column_label set in para?

  • % square :: logical — Is observables%square set in para?

  • % is_real :: logical — Is observables%is_real set in para?

  • % exp_surf :: logical — Is observables%exp_surf set in para?

  • % in_lab_frame :: logical — Is observables%in_lab_frame set in para?

  • % op_type :: logical — Is observables%op_type set in para?

  • % op_form :: logical — Is observables%op_form set in para?

  • % filename :: logical — Is observables%filename set in para?

  • % n_photons :: logical — Is observables%n_photons set in para?

  • % conjg_pulse :: logical — Is observables%conjg_pulse set in para?

  • % pulse_id :: logical — Is observables%pulse_id set in para?

  • % real_op :: logical — Is observables%real_op set in para?

  • % imag_op :: logical — Is observables%imag_op set in para?

  • % expand_hermitian :: logical — Is observables%expand_hermitian set in para?

  • % cos_theta :: logical — Is observables%cos_theta set in para?

  • % velocity_gauge :: logical — Is observables%velocity_gauge set in para?

  • % r_unit :: logical — Is observables%r_unit set in para?

  • % op_unit :: logical — Is observables%op_unit set in para?

  • % deriv_before :: logical — Is observables%deriv_before set in para?

  • % n_surf :: logical — Is observables%n_surf set in para?

  • % op_surf :: logical — Is observables%op_surf set in para?

  • % op_surf_1 :: logical — Is observables%op_surf_1 set in para?

  • % op_surf_2 :: logical — Is observables%op_surf_2 set in para?

  • % V_max :: logical — Is observables%V_max set in para?

  • % V_min :: logical — Is observables%V_min set in para?

  • % w_0 :: logical — Is observables%w_0 set in para?

  • % offset :: logical — Is observables%offset set in para?

  • % E_0 :: logical — Is observables%E_0 set in para?

  • % width :: logical — Is observables%width set in para?

  • % depth :: logical — Is observables%depth set in para?

  • % laser_I :: logical — Is observables%laser_I set in para?

  • % lin_grad :: logical — Is observables%lin_grad set in para?

  • % fwhm :: logical — Is observables%fwhm set in para?

  • % rshift :: logical — Is observables%rshift set in para?

  • % r_star :: logical — Is observables%r_star set in para?

  • % C12 :: logical — Is observables%C12 set in para?

  • % C3 :: logical — Is observables%C3 set in para?

  • % eta :: logical — Is observables%eta set in para?

  • % rc :: logical — Is observables%rc set in para?

  • % rat_r_0 :: logical — Is observables%rat_r_0 set in para?

  • % rotbarr_j :: logical — Is observables%rotbarr_j set in para?

  • % map_to_j :: logical — Is observables%map_to_j set in para?

  • % no_splining :: logical — Is observables%no_splining set in para?

  • % no_asymptote_check :: logical — Is observables%no_asymptote_check set in para?

  • % asym_SO :: logical — Is observables%asym_SO set in para?

  • % asym_stark :: logical — Is observables%asym_stark set in para?

  • % mass :: logical — Is observables%mass set in para?

  • % kin_base :: logical — Is observables%kin_base set in para?

  • % sparsity_model :: logical — Is observables%sparsity_model set in para?

  • % from_time_index :: logical — Is observables%from_time_index set in para?

  • % to_time_index :: logical — Is observables%to_time_index set in para?

  • % step :: logical — Is observables%step set in para?

  • % subspace :: logical — Is observables%subspace set in para?

type  qdyn_def_mod/is_set_oct_t[source]

Flags to indicate whether the items in the section oct are set explicitly in the config file or not

Type fields
  • % method :: logical — Is oct%method set in para?

  • % iter_start :: logical — Is oct%iter_start set in para?

  • % iter_stop :: logical — Is oct%iter_stop set in para?

  • % max_ram_mb :: logical — Is oct%max_ram_mb set in para?

  • % max_disk_mb :: logical — Is oct%max_disk_mb set in para?

  • % lbfgs_memory :: logical — Is oct%lbfgs_memory set in para?

  • % linesearch :: logical — Is oct%linesearch set in para?

  • % grad_order :: logical — Is oct%grad_order set in para?

  • % iter_dat :: logical — Is oct%iter_dat set in para?

  • % tau_dat :: logical — Is oct%tau_dat set in para?

  • % params_file :: logical — Is oct%params_file set in para?

  • % krotov2_conv_dat :: logical — Is oct%krotov2_conv_dat set in para?

  • % ABC_dat :: logical — Is oct%ABC_dat set in para?

  • % delta_J_conv :: logical — Is oct%delta_J_conv set in para?

  • % delta_J_T_conv :: logical — Is oct%delta_J_T_conv set in para?

  • % J_T_conv :: logical — Is oct%J_T_conv set in para?

  • % A :: logical — Is oct%A set in para?

  • % B :: logical — Is oct%B set in para?

  • % C :: logical — Is oct%C set in para?

  • % dynamic_sigma :: logical — Is oct%dynamic_sigma set in para?

  • % dynamic_lambda_a :: logical — Is oct%dynamic_lambda_a set in para?

  • % dynamic_la_wait :: logical — Is oct%dynamic_la_wait set in para?

  • % dynamic_la_marginfac :: logical — Is oct%dynamic_la_marginfac set in para?

  • % ema_alpha :: logical — Is oct%ema_alpha set in para?

  • % strict_convergence :: logical — Is oct%strict_convergence set in para?

  • % limit_pulses :: logical — Is oct%limit_pulses set in para?

  • % sigma_form :: logical — Is oct%sigma_form set in para?

  • % max_seconds :: logical — Is oct%max_seconds set in para?

  • % lambda_b :: logical — Is oct%lambda_b set in para?

  • % keep_pulses :: logical — Is oct%keep_pulses set in para?

  • % re_init_prop :: logical — Is oct%re_init_prop set in para?

  • % continue :: logical — Is oct%continue set in para?

  • % storage_folder :: logical — Is oct%storage_folder set in para?

  • % bwr_nint :: logical — Is oct%bwr_nint set in para?

  • % bwr_base :: logical — Is oct%bwr_base set in para?

  • % g_a :: logical — Is oct%g_a set in para?

  • % max_pulse_iter :: logical — Is oct%max_pulse_iter set in para?

  • % pulse_relerr :: logical — Is oct%pulse_relerr set in para?

  • % alpha1_split :: logical — Is oct%alpha1_split set in para?

  • % alpha2_split :: logical — Is oct%alpha2_split set in para?

  • % transf_func_file :: logical — Is oct%transf_func_file set in para?

  • % tf_self_cons_min :: logical — Is oct%tf_self_cons_min set in para?

  • % tf_self_cons_max :: logical — Is oct%tf_self_cons_max set in para?

  • % undist_diff_conv :: logical — Is oct%undist_diff_conv set in para?

  • % use_krotov_line_search :: logical — Is oct%use_krotov_line_search set in para?

  • % lnsrch_mode :: logical — Is oct%lnsrch_mode set in para?

  • % lnsrch_nrsteps :: logical — Is oct%lnsrch_nrsteps set in para?

  • % lnsrch_la_stepsize :: logical — Is oct%lnsrch_la_stepsize set in para?

type  qdyn_def_mod/is_set_prop_t[source]

Flags to indicate whether the items in the section prop are set explicitly in the config file or not

Type fields
  • % method :: logical — Is prop%method set in para?

  • % inhom_method :: logical — Is prop%inhom_method set in para?

  • % inhom_max_order :: logical — Is prop%inhom_max_order set in para?

  • % n_taylor :: logical — Is prop%n_taylor set in para?

  • % rk45_relerr :: logical — Is prop%rk45_relerr set in para?

  • % rk45_abserr :: logical — Is prop%rk45_abserr set in para?

  • % newton_relerr :: logical — Is prop%newton_relerr set in para?

  • % newton_norm_min :: logical — Is prop%newton_norm_min set in para?

  • % cheby_prec :: logical — Is prop%cheby_prec set in para?

  • % newton_arnoldi_order :: logical — Is prop%newton_arnoldi_order set in para?

  • % newton_max_restarts :: logical — Is prop%newton_max_restarts set in para?

  • % ITO_guess_method :: logical — Is prop%ITO_guess_method set in para?

  • % ITO_do_iter :: logical — Is prop%ITO_do_iter set in para?

  • % inhom_expan_err :: logical — Is prop%inhom_expan_err set in para?

  • % use_mcwf :: logical — Is prop%use_mcwf set in para?

  • % mcwf_order :: logical — Is prop%mcwf_order set in para?

type  qdyn_def_mod/is_set_psi_t[source]

Flags to indicate whether the items in the section psi are set explicitly in the config file or not

Type fields
  • % type :: logical — Is psi%type set in para?

  • % label :: logical — Is psi%label set in para?

  • % phase :: logical — Is psi%phase set in para?

  • % fromE :: logical — Is psi%fromE set in para?

  • % r_0 :: logical — Is psi%r_0 set in para?

  • % k_0 :: logical — Is psi%k_0 set in para?

  • % w_0 :: logical — Is psi%w_0 set in para?

  • % sigma :: logical — Is psi%sigma set in para?

  • % j :: logical — Is psi%j set in para?

  • % m :: logical — Is psi%m set in para?

  • % n :: logical — Is psi%n set in para?

  • % surf :: logical — Is psi%surf set in para?

  • % spin :: logical — Is psi%spin set in para?

  • % filename :: logical — Is psi%filename set in para?

  • % a :: logical — Is psi%a set in para?

type  qdyn_def_mod/is_set_pulse_t[source]

Flags to indicate whether the items in the section pulse are set explicitly in the config file or not

Type fields
  • % type :: logical — Is pulse%type set in para?

  • % t_start :: logical — Is pulse%t_start set in para?

  • % t_stop :: logical — Is pulse%t_stop set in para?

  • % t_0 :: logical — Is pulse%t_0 set in para?

  • % t_FWHM :: logical — Is pulse%t_FWHM set in para?

  • % E_0 :: logical — Is pulse%E_0 set in para?

  • % w_L :: logical — Is pulse%w_L set in para?

  • % chirprate :: logical — Is pulse%chirprate set in para?

  • % dp_separation :: logical — Is pulse%dp_separation set in para?

  • % w_flip :: logical — Is pulse%w_flip set in para?

  • % w_step :: logical — Is pulse%w_step set in para?

  • % delay :: logical — Is pulse%delay set in para?

  • % scale :: logical — Is pulse%scale set in para?

  • % phi :: logical — Is pulse%phi set in para?

  • % oct_lambda_a :: logical — Is pulse%oct_lambda_a set in para?

  • % oct_lambda_intens :: logical — Is pulse%oct_lambda_intens set in para?

  • % oct_increase_factor :: logical — Is pulse%oct_increase_factor set in para?

  • % oct_pulse_max :: logical — Is pulse%oct_pulse_max set in para?

  • % oct_pulse_min :: logical — Is pulse%oct_pulse_min set in para?

  • % oct_w_L_max :: logical — Is pulse%oct_w_L_max set in para?

  • % oct_w_L_min :: logical — Is pulse%oct_w_L_min set in para?

  • % oct_FWHM_max :: logical — Is pulse%oct_FWHM_max set in para?

  • % oct_FWHM_min :: logical — Is pulse%oct_FWHM_min set in para?

  • % oct_t_0_max :: logical — Is pulse%oct_t_0_max set in para?

  • % oct_t_0_min :: logical — Is pulse%oct_t_0_min set in para?

  • % oct_phi_max :: logical — Is pulse%oct_phi_max set in para?

  • % oct_phi_min :: logical — Is pulse%oct_phi_min set in para?

  • % oct_shape :: logical — Is pulse%oct_shape set in para?

  • % oct_parametrization :: logical — Is pulse%oct_parametrization set in para?

  • % is_complex :: logical — Is pulse%is_complex set in para?

  • % shape_t_start :: logical — Is pulse%shape_t_start set in para?

  • % shape_t_stop :: logical — Is pulse%shape_t_stop set in para?

  • % ftbaseline :: logical — Is pulse%ftbaseline set in para?

  • % t_rise :: logical — Is pulse%t_rise set in para?

  • % t_fall :: logical — Is pulse%t_fall set in para?

  • % oct_shapefile :: logical — Is pulse%oct_shapefile set in para?

  • % oct_outfile :: logical — Is pulse%oct_outfile set in para?

  • % oct_outfile_param :: logical — Is pulse%oct_outfile_param set in para?

  • % oct_spectral_filter :: logical — Is pulse%oct_spectral_filter set in para?

  • % oct_specfil_frq_thld :: logical — Is pulse%oct_specfil_frq_thld set in para?

  • % id :: logical — Is pulse%id set in para?

  • % filename :: logical — Is pulse%filename set in para?

  • % time_unit :: logical — Is pulse%time_unit set in para?

  • % ampl_unit :: logical — Is pulse%ampl_unit set in para?

  • % check_tgrid :: logical — Is pulse%check_tgrid set in para?

  • % rwa :: logical — Is pulse%rwa set in para?

  • % optimize :: logical — Is pulse%optimize set in para?

  • % transf_func_file :: logical — Is pulse%transf_func_file set in para?

type  qdyn_def_mod/is_set_scattering_t[source]

Flags to indicate whether the items in the section scattering are set explicitly in the config file or not

Type fields
  • % method :: logical — Is scattering%method set in para?

  • % system :: logical — Is scattering%system set in para?

  • % energy :: logical — Is scattering%energy set in para?

  • % E_min :: logical — Is scattering%E_min set in para?

  • % E_max :: logical — Is scattering%E_max set in para?

  • % nE :: logical — Is scattering%nE set in para?

  • % E_grid_type :: logical — Is scattering%E_grid_type set in para?

  • % filename :: logical — Is scattering%filename set in para?

  • % energy_unit :: logical — Is scattering%energy_unit set in para?

  • % I :: logical — Is scattering%I set in para?

  • % B_static :: logical — Is scattering%B_static set in para?

  • % E_static :: logical — Is scattering%E_static set in para?

  • % g1 :: logical — Is scattering%g1 set in para?

  • % g2 :: logical — Is scattering%g2 set in para?

  • % A1 :: logical — Is scattering%A1 set in para?

  • % A2 :: logical — Is scattering%A2 set in para?

  • % zeta1 :: logical — Is scattering%zeta1 set in para?

  • % beta1 :: logical — Is scattering%beta1 set in para?

  • % R1 :: logical — Is scattering%R1 set in para?

  • % zeta2 :: logical — Is scattering%zeta2 set in para?

  • % beta2 :: logical — Is scattering%beta2 set in para?

  • % R2 :: logical — Is scattering%R2 set in para?

  • % i1 :: logical — Is scattering%i1 set in para?

  • % s1 :: logical — Is scattering%s1 set in para?

  • % i2 :: logical — Is scattering%i2 set in para?

  • % s2 :: logical — Is scattering%s2 set in para?

  • % mi1 :: logical — Is scattering%mi1 set in para?

  • % mi2 :: logical — Is scattering%mi2 set in para?

  • % ms1 :: logical — Is scattering%ms1 set in para?

  • % ms2 :: logical — Is scattering%ms2 set in para?

  • % l :: logical — Is scattering%l set in para?

  • % ml :: logical — Is scattering%ml set in para?

  • % entrance_surf :: logical — Is scattering%entrance_surf set in para?

  • % entrance_channel :: logical — Is scattering%entrance_channel set in para?

  • % l_max :: logical — Is scattering%l_max set in para?

  • % ntheta :: logical — Is scattering%ntheta set in para?

  • % coup_al :: logical — Is scattering%coup_al set in para?

  • % coup_d :: logical — Is scattering%coup_d set in para?

  • % coup_i1s1 :: logical — Is scattering%coup_i1s1 set in para?

  • % coup_i2s2 :: logical — Is scattering%coup_i2s2 set in para?

  • % coup_i2s1 :: logical — Is scattering%coup_i2s1 set in para?

  • % coup_s1s2 :: logical — Is scattering%coup_s1s2 set in para?

  • % coup_sl :: logical — Is scattering%coup_sl set in para?

  • % wavefunctions :: logical — Is scattering%wavefunctions set in para?

  • % scat_length :: logical — Is scattering%scat_length set in para?

  • % scat_phase :: logical — Is scattering%scat_phase set in para?

  • % diff_cross_section :: logical — Is scattering%diff_cross_section set in para?

  • % wigner_tables :: logical — Is scattering%wigner_tables set in para?

type  qdyn_def_mod/is_set_sceint_t[source]

Flags to indicate whether the items in the section sceint are set explicitly in the config file or not

Type fields
  • % l_max :: logical — Is sceint%l_max set in para?

  • % Z :: logical — Is sceint%Z set in para?

  • % numeric_2e :: logical — Is sceint%numeric_2e set in para?

  • % orbital_ints :: logical — Is sceint%orbital_ints set in para?

  • % imag_spharm :: logical — Is sceint%imag_spharm set in para?

  • % prim_integrals :: logical — Is sceint%prim_integrals set in para?

  • % n_max :: logical — Is sceint%n_max set in para?

  • % n_frozen :: logical — Is sceint%n_frozen set in para?

  • % field_comp :: logical — Is sceint%field_comp set in para?

  • % field_gauge :: logical — Is sceint%field_gauge set in para?

type  qdyn_def_mod/is_set_t[source]
Type fields
type  qdyn_def_mod/is_set_tgrid_t[source]

Flags to indicate whether the items in the section tgrid are set explicitly in the config file or not

Type fields
  • % t_start :: logical — Is tgrid%t_start set in para?

  • % t_stop :: logical — Is tgrid%t_stop set in para?

  • % dt :: logical — Is tgrid%dt set in para?

  • % nt :: logical — Is tgrid%nt set in para?

  • % fixed :: logical — Is tgrid%fixed set in para?

type  qdyn_def_mod/krotov_work_t[source]

Work data for Krotov’s method.

Type fields
  • % bw_states(:) :: state_t — Backward propagated chi states

  • % prev_states(:) :: state_t — States from previous iteration (2nd order)

  • % delta_phi(:) :: state_t\(\delta \phi\), difference between the forward propagated states of the current and the last iterations (2nd order)

  • % chi_norm(:) :: real(idp) — The norm of the initial chi state (per system)

  • % fw_temp(:) :: state_t — Temporary state for the forward propagated states

  • % bw_temp(:) :: state_t — Temporary state for the backward propagated states

  • % ref_states(:) :: state_t — Temporary state as reference for the updates, when converging self-consistently and propagating multiple times in one pulse update

  • % fw_temp_imag(:) :: state_t — Temporary state for forward propagated states when optimizing a complex pulse

  • % ref_pulses(:) :: pulse_t — Temporary pulses as reference for the updates, when converging self-consistently. \(\delta \epsilon\) is added to these pulses.

  • % delta_eps(:) :: complex(idp) — The Krotov pulse update \(\delta \epsilon\).

  • % delta_eps_real(:) :: complex(idp) — The real part of the Krotov pulse update \(\delta \epsilon\), when optimizing a complex pulse.

  • % delta_eps_imag(:) :: complex(idp) — The imaginary part of the Krotov pulse update \(\delta \epsilon\), when optimizing a complex pulse.

  • % fw_states(:) :: state_tFor distorted pulses Forward propagated states

  • % fw_psi_norm(:) :: real(idp)For distorted pulses Norm of the forward propagated psi states

  • % bw_temp_imag(:) :: state_tFor distorted pulses Temporary state for backward propagated when optimizing a complex pulse

  • % prev_pulses(:) :: pulse_tFor distorted pulses Auxiliary pulses for storing the pulse from the previous cycle

  • % is_converged(:) :: logicalFor distorted pulses Array to keep track if the individual pulses are already converged.

  • % chi_dHLdP_psi(:,:,:) :: complex(idp)For distorted pulses Used for saving \(\bra{\chi}^{(j)}\frac{\delta H}{ \delta\epsilon^{(k)}}(t_i)\ket{\psi^{(j)}}\) or \(\bra{\chi^{(j)}}\frac{\delta H}{ \delta\epsilon^{(k)}}(t_i)\ket{\psi^{(j)}}\), where the indices are (i,j,k)

  • % chi_dHLdP_psi_imag(:,:,:) :: complex(idp)For distorted pulses Used for saving \(\bra{\chi}^{(j)}\frac{\delta H}{ \delta\epsilon^{(k)}}(t_i)\ket{\psi^{(j)}}\) or \(\bra{\chi^{(j)}}\frac{\delta H}{ \delta\epsilon^{(k)}}(t_i)\ket{\psi^{(j)}}\), where the indices are (i,j,k)

  • % dHLdP_chi(:,:,:) :: state_tFor distorted pulses Used for saving \(\frac{\delta H }{\delta\epsilon^{(k)}}(t_j) \ket{\psi^{(i)}}\) or \(\frac{\delta L }{\delta\epsilon^{(k)}}(t_j) \ket{\psi^{(i)}}\) where the indices are (i,j,k)

  • % dHLdP_chi_imag(:,:,:) :: state_tFor distorted pulses Used for saving \(\frac{\delta H }{\delta\epsilon^{(k)}}(t_j) \ket{\psi^{(i)}}\) or \(\frac{\delta L }{\delta\epsilon^{(k)}}(t_j) \ket{\psi^{(i)}}\) where the indices are (i,j,k)

  • % best_pulse_linesearch(:) :: pulse_t — Store best pulse for line search

  • % best_fw_states_T_linesearch(:) :: state_t — Store best fw_states_T for line search

type  qdyn_def_mod/lbfgs_work_t[source]

Collection of internal data for LBFGS optimization.

Corresponds to the last 16 parameters of the setulb routine from the LBFGSB library, plus the additional parameter linesearch, which counts the number of linesearch iterations.

Type fields
  • % combined_pulse(:) :: real(idp) — “Solution vector” of size n. If there is only one pulse to be optimized, these are the (real) values of the pulse. If there is more than one pulse, these are the values from all pulses, stored consecutively

  • % lower_bounds(:) :: real(idp) — array of size n of lower bounds on the pulse values over time. If the i-th value has no lower bound, l(i) need not be defined.

  • % upper_bounds(:) :: real(idp) — array of size n of upper bounds on the pulse values over time.

  • % bound_type(:) :: integer

    array of size n of integer codes declaring what type of bound each pulse value has:

    • 0 if combined_pulse(i) is unbounded,

    • 1 if combined_pulse(i) has only a lower bound,

    • 2 if combined_pulse(i) has lower and upper bounds,

    • 3 if combined_pulse(i) has only an upper bound.

  • % gradient(:) :: real(idp) — Array of size n of gradients

  • % factr :: real(idp) — Tolerance in the termination test for the algorithm. Disable by setting to zero.

  • % pgtol :: real(idp) — Gradient tolerance in the termination test for the algorithm. Disable by setting to zero.

  • % wa(:) :: real(idp) — Work array of size (2*mmax + 4)*nmax + + 11*mmax^2 +8*mmax. Internal use only!

  • % iwa(:) :: integer — Work array of size 3*nmax. Internal use only!

  • % task :: character(len=60) — String controlling workflow: 'START', 'FG', 'NEW_X', 'CONV', 'ABNO', 'ERROR' (see LBFGSB documentation)

  • % verbosity :: integer

    Integer controlling how much information is printed by the LBFGSB library routines

    • verbosity < 0: no output is generated;

    • verbosity = 0: print only one line at the last iteration;

    • 0 < verbosity < 99: print also \(f\) and projected gradient every verbosity iterations;

    • verbosity = 99: print details of every iteration except n-vectors;

    • verbosity = 100: print also the changes of active set and final \(x\);

    • verbosity > 100: print details of every iteration including \(x\) and \(g\);

    When verbosity > 0, the file iterate.dat will be created to summarize the iteration.

  • % csave :: character(len=60) — Character working array

  • % lsave(4) :: logical

    Logical working array

    • lsave(1) = .true.: the initial \(x\) did not satisfy the bounds;

    • lsave(2) = .true.: the problem contains bounds;

    • lsave(3) = .true.: each variable has upper and lower bounds.

  • % isave(44) :: integer

    Integer working array

    On exit with task = NEW_X, it contains information that the user may want to access:

    • isave(30): the current iteration number;

    • isave(34): the total number of function and gradient evaluations;

    • isave(36): the number of function value or gradient evaluations in the current iteration;

    • isave(38): the number of free variables in the current iteration;

    • isave(39): the number of active constraints at the current iteration;

  • % dsave(29) :: real(idp)

    Double precision working array

    On exit with task = NEW_X, it contains information that the user may want to access:

    • dsave(2): the value of \(f\) at the previous iteration;

    • dsave(5): the machine precision epsmch generated by the code;

    • dsave(13): the infinity norm of the projected gradient;

  • % J_T :: real(idp) — Value of the final time functional for a specific array of values in combined_pulse. Note that optimization with LBFGS does not include any additional penalty terms like pulse or state dependent terms for intermediate times

  • % linesearches :: integer — Counter for how many linesearch iterations were done

  • % bw_storage(:) :: prop_seg_storage_t — Data structure to store all the states of the backwards propagation. They are required for calculating the gradient of the time evolution operator with respect to the pulse at each point in time

type  qdyn_def_mod/line_search_info_t[source]

Basic information needed for performing a line search.

Data type for implementing a line search, which determines the best parameter x for a function f.

Type fields
  • % iter :: integer — Number of iterations for the line search

  • % orig_param_x0 :: real(idp) — Initial value x_0

  • % best_param_x :: real(idp) — Best parameter that was used so far

  • % best_f_value :: real(idp) — Best function value reached so far, obtained by evaluating f(best_param_x)

  • % estimated_gradient :: real(idp) — If possible, store the estimated the gradient f'.

  • % estimated_hessian :: real(idp) — If possible, store the estimated the hessian f''.

type  qdyn_def_mod/mcwf_work_t[source]

Internal data for the Monte-Carlo Wave Function method.

Type fields
  • % state_prev :: state_t — Copy of the state at the beginning of the time step, required for backtracking.

  • % p(:) :: real(idp) — For each Lindblad operator, the un-normalized probability that that operator will induce a quantum jump

  • % L_psi(:) :: state_t — Array of states \(\Op{L}_n \Ket{\Psi}\) for all of the Lindblad operators \(\Op{L}_n\).

  • % n_jumps :: integer — The number of quantum jumps that have occured

  • % t_jump(:) :: real(idp) — Array of times at which jumps have occured. The array may have an arbitrary size >= n_jumps, any entries besides n_jumps must not be used.

  • % i_op_jump(:) :: integer — Array of indicies to indication which Lindlad operator was used at a specific jump time. Same size as t_jump

type  qdyn_def_mod/observable_t[source]

Specification of an observable, as part of prop_work_exp_t.

Type fields
  • % type :: character(len=atype_l) — Type of the observable, cf. type in observables_pt

  • % outfile :: character(len=file_l) — Name of file to which to write expectation values

  • % exp_unit :: character(len=unit_l) — Physical unit in which the expectation value should be written to outfile

  • % time_unit :: character(len=unit_l) — Physical unit in which the time grid should be written to outfile

  • % funit_index :: integer — Reference to unit number of outfile if outfile has been opened for writing. A negative value indicates that the file is not yet open. Generally, this will be an index in prop_work%exp%file_units

  • % key_index :: integer — Internal field used to keep track of which other observable in an array of observables controls the I/O properties (i.e., index of the first observable with the same outfile). Generally, this will be an index in prop_work%exp%observables

  • % from_time_index :: integer — Index on total time grid from where to start calculating/writing expectation values

  • % to_time_index :: integer — Index on total time grid where to stop calculating/writing expectation values

  • % step :: integer — Step width for where to calculate/write expectation values between from_time_index and to_time_index

  • % grid_ops(1) :: grid_op_t — If the observable is an operator on a grid (type=='op'), specification of that operator is stored in grid_ops(1)

  • % op_matrix :: op_matrix_t — If the observable is a matrix (type=='matrix'), specification of the matrix

  • % J :: spin_couplings_t — If the observable is a spin operator (type=='spin'), data structure for all contained spin operators

  • % exp_surf :: integer — Index of the energy surface on which the to calculate the expectation value. A value of 0 indicates that the expectation value should be calculated over the entire Hilbert space

  • % column_label :: character(len=label_l) — Label to be used in the header of outfile (excluding unit)

  • % square :: character(len=label_l) — Label for the expectation value of the square of the observable, see square ins observables_pt

  • % is_real :: logical — Flag to indicate whether the expectation value is real complex

  • % in_lab_frame :: logical — If .true., the observable is explicitely defined to be in the lab frame. Thus, if expectation values for the observables are calculated with respect to states obtained from propagation in a rotating frame, those states should be converted to the lab frame beforehand.

type  qdyn_def_mod/observables_pt[source]

Config file parameters for observables.

Type fields
  • % type :: character(len=atype_l) — String indicating type of the observable {‘op’| ‘matrix’|’ham’|’kin’|’r’|’mom’|’norm’|’pop’| ‘spin’}

  • % label :: character(len=label_l) — Label or system the observable belongs to

  • % outfile :: character(len=file_l) — Name of file to which to write the expectation values for the observable. If empty, no values will be written to file, and the expectation values will only be calculated in-memory.

  • % exp_unit :: character(len=unit_l) — Physical unit in which the expectation value should be written to outfile [‘iu’]

  • % time_unit :: character(len=unit_l) — Physical unit in which the time grid should be written to outfile. Note that all expectation values that are written to the same file should have the same time_unit [‘iu’]

  • % column_label :: character(len=label_l) — Label for the column in the outfile. Should be as short as possible, less than 15 characters in general, in order to avoid truncation

  • % square :: character(len=label_l) — Label for the column in outfile that contains the expectation value of the square of the observable. Definition of the label indicates the expectation value should be calculated and the that outfile should contain such a column (immediately after the column for the normal expectation value). That is, if and only if square is defined in the config file, the outfile will contain columns for the square of the expectation value, from which the variance can be calculated.

  • % is_real :: logical — If true, the expectation value for the observable is assumed to be real, resulting in a single column for the expectation value in outfile [.true.]

  • % exp_surf :: integer — If > 0, when calculating expectation values of multi-surface states, calculate the expectation value only on the given surface. That is, attach a projector to the given surface to the observable, and re-normalize the expectation value with the population on the surface. [0]

  • % in_lab_frame :: logical — If .true., the observable is explicitely defined to be in the lab frame. Thus, if expectation values for the observables are calculated with respect to states obtained from propagation in a rotating frame, those states should be converted to the lab frame beforehand.

  • % op_type :: character(len=atype_l) — For entries of type=='op', type=='mom_op', or type=='matrix', the type of operator represented by the entry {‘pot’|’dip’|’so’| ‘cwlaser’|’stark’|’dstark’}

  • % op_form :: character(len=atype_l) — For operators described analytically, name of formula to be used. If operator is not described analytically, must take the value file, and the filename attribute must be set as well {‘morse’|’hamos’|’file’|’gauss’| ‘dipole’|’linear’|’const’|’halfhamos’}

  • % filename :: character(len=file_l) — If op_form=='file', the filename from which to read the operator

  • % n_photons :: integer — Number of photons involved in the operator by the pulse [1]

  • % conjg_pulse :: logical — If True, couple to the complex conjugate of the pulse instead of the original pulse value

  • % pulse_id :: integer — ID of pulse in the pulse array the operator is assigned to, zero if not connected to a pulse

  • % real_op :: logical — If true and type is 'matrix', the operator matrix is assumed to consist of only real values [.true.]

  • % imag_op :: logical — If true, the operator is imaginary (multiplied by \(i\))

  • % expand_hermitian :: logical — If true in conjunction with type=='matrix', the input file (filename) is assumed to contain data only for the upper or lower triangle. The other triangle will be initialized as the complex conjugate.

  • % cos_theta :: logical — True if the operator should also act on the theta-dimension, according to \(\cos(\theta)\)

  • % velocity_gauge :: logical — True if the operator should couple to the pulse in the velocity gauge instead of the length gauge, i.e. the pulse is in fact a vector potential [.false.]

  • % r_unit :: character(len=unit_l) — If operator is read from file, unit in which the spatial grid is given [‘iu’]

  • % op_unit :: character(len=unit_l) — If operator is read from file, unit in which the operator is given [‘iu’]

  • % deriv_before :: logical — Before applying the operator, apply \(\dd/\dd{}x\)

  • % n_surf :: integer — Total number of surfaces (important for operator matrices)

  • % op_surf :: integer — Surface to which the operator should be added operator

  • % op_surf_1 :: integer — Number of surface 1 that is coupled by the operator

  • % op_surf_2 :: integer — Number of surface 2 that is coupled by the operator

  • % V_max :: real(idp) — For analytic operators (everything except 'file'), the maximum value of the operator. Any values larger than V_max will be truncated. [huge(zero)]

  • % V_min :: real(idp) — Like V_max, but for minimum of operator [-huge(zero)]

  • % w_0 :: real(idp) — If op_form is 'hamos', frequency of harmonic operator

  • % offset :: real(idp) — If op_form is 'hamos' or 'linear', x-offset of the operator

  • % E_0 :: real(idp) — If op_form is 'hamos', minimum of operator. If op_form is 'const', constant value

  • % width :: real(idp) — If op_form is 'morse', width of Morse potential

  • % depth :: real(idp) — If op_form is 'morse' or gauss, depth of the operator

  • % laser_I :: real(idp) — If op_form is 'cwlaser', intensity of the cw laser

  • % lin_grad :: real(idp) — If op_form is 'linear', gradient of the operator

  • % fwhm :: real(idp) — If op_form is 'gauss', full-with-at-half-maximum of operator

  • % rshift :: real(idp) — If op_form is 'file', rotational barrier shift

  • % r_star :: real(idp) — If op_form is 'dipole', value of \(r^{*}\)

  • % C12 :: real(idp) — If op_form is 'dipole', strength of inner operator barrier

  • % C3 :: real(idp) — If op_form is 'dipole', strength of dipole operator

  • % eta :: real(idp) — If op_form is 'halfhamos', strength of half harmonic potential

  • % rc :: real(idp) — If op_form is 'halfhamos', start of half harmonic potential

  • % rat_r_0 :: real(idp) — If op_form is 'rational', expansion point of the rational function

  • % rotbarr_j :: integer — If op_form is 'rotbarrier', rotational quantum number

  • % map_to_j :: integer — Contains the value of the rotational quantum number \(j\) of the wavefunction on which the potential will act [-1]

  • % no_splining :: logical — If true in combination with op_form=='file', don’t interpolate the potential data in the file, but assume that it perfectly matches the grid

  • % no_asymptote_check :: logical — If true, the potential energy read from file is allowed not to be asymptotically zero

  • % asym_SO :: real(idp) — Asymptotic value of the spin-orbit coupling

  • % asym_stark :: real(idp) — Asymptotic value of the Stark shift

  • % mass :: real(idp) — Mass of atom/molecule [one]

  • % kin_base :: character(len=base_l) — Basis states to use for expansion of wave functions {‘sin’|’exp’|’cardinal’}

  • % sparsity_model :: character(len=sparsity_model_l) — If type is 'matrix', sparsity model to use for initializing and storing the given operator matrix {‘banded’|’indexed’|’full’}

  • % from_time_index :: integer — Index on total time grid from where to start calculating/writing expectation values. Negative values count from the end of the time grid [1]

  • % to_time_index :: integer — Index on total time grid where to stop calculating/writing expectation values. Negative values count from the end of the time grid [-1]

  • % step :: integer — Step width for where to calculate/write expectation values between from_time_index and to_time_index [1]

  • % subspace :: character(len=op_subspace_l) — If type is 'matrix', this string defines the subspace of the wave function psi of type state_t on which the operator matrix acts, i.e., the five dimensions are associated with three spatial dimension, one spin dimension and the surface dimension {‘spat1’| ‘spat2’|’spat3’|’spin’|’surf’|’total’} [‘total’]

type  qdyn_def_mod/oct_info_t[source]

Keeps track of OCT convergence information and functionals.

Type fields
  • % iter_tstamp :: integer — Epoch seconds at which last OCT iteration finished

  • % start_tstamp :: integer — Epoch seconds at which firtst OCT iteration started

  • % secs_last_iter :: integer — Number of seconds the last OCT iteration took

  • % iter_count :: integer — Number of OCT iterations that have been completed

  • % A :: real(idp) — Supremum over second order derivative of the \(J_T\); \(A = -\frac{1}{2} \frac{\dd^2 F}{\dd \phi^2}\)

  • % B :: real(idp) — Non-unitarity/Non-linearity parameter for second order Krotov

  • % C :: real(idp) — Non-unitarity/Non-linearity parameter and/or for state-dependent constraint

  • % tau_s(:) :: complex(idp) — Complex overlap between final state and target for each system

  • % delta_tau_s(:) :: complex(idp) — difference of tau_s to last iteration

  • % tau :: complex(idp) — Average of tau_s.

  • % delta_tau :: complex(idp) — Difference of tau to last iteration

  • % eta :: real(idp) — Average of absolute-squares of tau_s (for phase- insensitive simultaneous state-to-state transfer)

  • % delta_eta :: real(idp) — Difference of eta to last iteration

  • % J_T :: real(idp) — Value of final time functional

  • % delta_J_T :: real(idp) — Difference of \(J_T\) to last iteration

  • % g_a_int :: real(idp) — Control-dependent cost integral

  • % g_a_int_ema :: real(idp) — Moving exponential average of g_a_int. \(EMA^{(1)} = \alpha g^{(1)} + (1-\alpha) EMA^{(0)}\), with \(g^{(1)}\) the value of g_a_int for the new iteration, and \(\alpha =\) para%oct%ema_alpha.

  • % delta_g_a_int :: real(idp) — Difference of g_a_int between optimized and guess pulse, i.e. \(\int g_a(\epsilon^{(1)}) - g_a(\epsilon^{(0)})\) which is not necessarily the change of g_a_int compared to the last iteration, as \(g_a\) often contains the guess pulse as a reference field. This means that \(g_a\) is a different function in different iterations. To calculate delta_g_a_int, however, the same reference field must be used in the two evalution of \(g_a\)

  • % g_b_int :: real(idp) — State-dependent cost integral

  • % delta_g_b_int :: real(idp) — Difference of g_b_int to last iteration

  • % g_bwr_int :: real(idp) — State-dependent cost integral for Krotov-2 with bandwith restriction

  • % delta_g_bwr_int :: real(idp) — Change in g_bwr_int

  • % J :: real(idp) — Complete cost functional (J = J_T + g_a_int + g_b_int)

  • % delta_J :: real(idp) — Difference of J to last iteration

  • % reached_convergence :: logical — Set to true after the optimization has reached convergence (delta_J_conv in para_t%oct)

  • % reached_timelimit :: logical — Set to true if the optimization is about to surpass the OCT time limit (max_seconds in para_t%oct)

  • % line_search_info :: line_search_info_t — Information concerning the line search

type  qdyn_def_mod/oct_pt[source]

Config file parameters for OCT.

Type fields
  • % method :: character(len=method_l) — Name of optimization method to use {‘krotovpk’| ‘krotov2’|’krotov2_bwr’|’lbfgs’|’spa’}

  • % iter_start :: integer — Number of first OCT iteration [1]

  • % iter_stop :: integer — Number of last OCT iteration

  • % max_ram_mb :: integer — Maximum amount of RAM in MB that can be used in storing backward-propagated states in the Krotov algorithm, or forward-propagated states in LBFGS

  • % max_disk_mb :: integer — Maximum amount of hard disk storage that can be used in caching the segmented storage, cf. max_ram_mb.

  • % lbfgs_memory :: integer — Maximum number of variable metric corrections used to define the limited memory matrix in LBFGS (commonly abbreviated as ‘m’ in LBFGS papers)

  • % linesearch :: integer — Maximum number of linesearch iterations in LBFGS

  • % grad_order :: integer — Order to which to evalutate the gradient of the time propagation operator (in Taylor series) [2]

  • % iter_dat :: character(len=file_l) — Name of file to which to write convergence information after each iteration

  • % tau_dat :: character(len=file_l) — Name of file to which to write complex overlap of propagated states with target states

  • % params_file :: character(len=file_l) — Name of file through which the user can dynamically modify OCT-relevant parameters.

  • % krotov2_conv_dat :: character(len=file_l) — Name of file to which write an analysis of the convergence for the Krotov 2 OCT algorithm

  • % ABC_dat :: character(len=file_l) — Name of file to which to write \(A\), \(B\), \(C\) parameters from Krotov-2 \(\sigma\) calculation, after each iteration

  • % delta_J_conv :: real(idp) — Convergence limit of relative change in \(J\), i.e., \(|\Delta J| / |J|\). OCT stops if the relative change in \(J\) between two iterations is smaller than this number

  • % delta_J_T_conv :: real(idp) — Like delta_J_conv, but for \(J_T\)

  • % J_T_conv :: real(idp) — Convergence limit for \(J_T\). OCT stops if \(J_T\) becomes smaller than this number

  • % A :: real(idp) — Krotov 2nd order: Supremum over second order derivative of \(J_T\)

  • % B :: real(idp) — Krotov 2nd order: Non-unitarity/Non-linearity parameter for second order Krotov

  • % C :: real(idp) — Krotov 2nd order: Non-unitarity/Non-linearity parameter and/or for state-dependent constraint

  • % dynamic_sigma :: logical — If .true., calculate \(A\), \(B\), \(C\) dynamically from the results of the previous iterations

  • % dynamic_lambda_a :: real(idp) — If given \(> 0\), factor that enters dynamic determination of OCT weight \(lambda_a\) for each pulse. Each \(\lambda_a\) will be scaled with the factor EMA(g_a_int) / (J_T*dynamic_lambda_a). where EMA is the exponential moving average.

  • % dynamic_la_wait :: integer — If dynamic_lambda_a is \(> 0\), dynamic_la_wait determines how many oct steps to wait until the next update can take place. [10]

  • % dynamic_la_marginfac :: real(idp) — If dynamic_lambda_a is \(> 0\), dynamic_la_marginfac describes the relative factor by which \(\lambda_a\) must be off until it is changed. [2.0]

  • % ema_alpha :: real(idp) — The smoothing factor of the exponential moving average, used for dynamic updates of \(\lambda_a\), caused by setting dynamic_lambda_a \(> 0\). Note that \(0 <\) ema_alpha \(\leq 1\). [0.3]

  • % strict_convergence :: logical — If .true., abort the program if convergence is lost

  • % limit_pulses :: logical — If .true., optimized pulses are limited by OCT pulse_max, pulse_min (by truncation)

  • % sigma_form :: character(len=sigma_form_l) — Must be either 'global' or 'local', depending on whether sigma should be calculated to ensure \(\Delta R(t) > 0\) should be fulfilled at each point in time (‘local’) or whether only the integral over \(\Delta R(t)\) should be greater than zero. The 'global’ formula does not use the A parameter. {‘global’|’local’}

  • % max_seconds :: integer — Maximum number of seconds that should be spent in optimization

  • % lambda_b :: real(idp) — Scaling parameter in state-dependent constraint \(g_b\)

  • % keep_pulses :: character(len=keep_pulses_l) — If 'all', keep all optimized pulses from previous iteration will have the suffix .`*iter* where *iter* is the OCT iteration number that produced the pulse.  If `keep_pulses is 'prev', the pulse from the previous OCT iteration will be kept with the suffix .prev. If keep_pulses is the empty string, no previous pulses will be kept. The pulse of the current OCT iteration is always written to the file given by oct_outfile in the pulse section. {‘all’|’prev’}

  • % re_init_prop :: logical — Unless this is set to .false., OCT will recalculate the Hamiltonian’s spectral radius and re-initialize its work array at each iteration. Setting re_init_prop to .false. skips this step. The user must then take extra care to make sure the propagation is initialized in such a way that it is appropriate to the entired optimization. For moveable grids, krotov always behaves as if re_init_prop==.false. [.true.]

  • % continue :: logical — If set to .true., see if there are optimized pulses written out from a previous optimization. If there are, use those as guess pulses instead of the pulses specified in the config file. Continue the optimization at the next iteration number. This should be .true. unless explicitly set to .false. in the config file. [.true.]

  • % storage_folder :: character(len=file_l) — Folder in which to keep all files necessary for caching any segmented propagation storage to disk. [‘.’]

  • % bwr_nint :: integer — Amount of integration intervals in the gauss integration for the Fredholm solver (bandwidth restriction only)

  • % bwr_base :: character(len=bwr_base_l) — Basis set used for Fredholm solver in BWR Krotov {‘symmtria’|’symmtria_full’}

  • % g_a :: character(len=g_a_l) — Identifying name for the pulse-dependent constraint in Krotov {‘delta_eps_sq’|’intens’} [‘delta_eps_sq’]

  • % max_pulse_iter :: integer — Maximum number of iterations for the self-consistent loop in which the pulse is calculated. (Default is no self-consistency.) [1]

  • % pulse_relerr :: real(idp) — Relative error up to which the pulse is calculated self-consistently. [1.0d-5]

  • % alpha1_split :: real(idp) — Weighting for the first term in the split functional J_T_split() [0.5]

  • % alpha2_split :: real(idp) — Weighting for the second term in the split functional J_T_split() [0.5]

  • % transf_func_file :: character(len=file_l) — If present, name of the file containing the transfer function for distorting the pulse.

  • % tf_self_cons_min :: integer — Minimum number of self-consistent loop interations, in case of optimizing a pulse distorted by a transfer function [1]

  • % tf_self_cons_max :: integer — Maximum number of self-consistent loop interations, in case of optimizing a pulse distorted by a transfer function [10]

  • % undist_diff_conv :: real(idp) — Relative error up to which the undistorted pulse is calculated self-consistently if a transfer function is given [1.0d-5]

  • % use_krotov_line_search :: logical — Use a line search to extend Krotov’s algorithm [.false.]

  • % lnsrch_mode :: character(len=atype_l) — Line search mode [‘log-full’]

  • % lnsrch_nrsteps :: integer — Number of steps used for the line search for each optimization step [15]

  • % lnsrch_la_stepsize :: real(idp) — Step size used for the line search for each optimization step. If a ‘log-*’ lnsrch_mode is specified, it determines the factor between two steps [2]

type  qdyn_def_mod/oct_target_t[source]

Optimization objective for OCT.

The optimization objective (state_initial and state_target) is defined in the lab frame; if the Hamiltonian and the pulses are in a rotating frame, rwa_vector should be allocated and set to allow translation between the lab frame and the rotating frame (see state_lab_to_rot() and state_rot_to_lab() routines).

Type fields
  • % state_initial :: state_t — Pointer to initial state

  • % state_target :: state_t — Pointer to target state

  • % rwa_vector(:) :: real(idp) — If allocated, shifts of energy levels in the RWA, to allow conversion to/from the lab frame.

  • % ops(:) :: grid_op_t — Array of operators, the sum over their expectation values will be minimized (using J_op as a functional)

  • % gen :: dyn_generator_t — Pointer to the dynamical generator of the system

  • % prop_work :: prop_work_t — Propagation work arrays

  • % grid :: grid_t — Spatial grid of the system

  • % gate(:,:) :: complex(idp) — Unitary transformation to be optimized, as a possible alternative to state_target

  • % weight :: real(idp) — Relative weight for a target, compared to other targets in the same optimization

  • % w_unitarity :: real(idp) — When optimizing with functionals that include an extra term to ensure unitarity (in a logical subspace), the weight that should be placed on unitarity. All targets in an optimization must have the same value (between 0 and 1) of w_unitarity

  • % purity :: real(idp) — Purity of state_initial (one if it is a wave function)

  • % in_liouville_space :: logical.true. if the target is defined in liouville space (i.e. state_initial, state_target are density matrices

  • % storage :: target_storage_t — Internal scratch space used to store e.g. all the propagated states under the guess and/or optimized pulses

  • % matrix_op(:) :: op_matrix_t — List of op-matrices (currently only used by J/chis_variance and J/chis_matrix_expect)

  • % matrix_op_dag(:) :: op_matrix_t — Second list of op-matrices (currently only used by J/chis_variance)

  • % normalize :: logical — Determines if the functional/chis will be normalized (currently only used by J/chis_variance)

type  qdyn_def_mod/op_matrix_t[source]

Operator in explicit matrix form.

It contains a matrix \(\hat{H}\) of the dimension of the reduced or full Hilbert space to which it will be applied to.

Internally, \(\hat{H}\) may be stored in a sparse format, in which case the format is described by the sparsity_model component. Allowed values for sparsity_model are:

Type fields
  • % full(:,:) :: complex(idp) — Storage for full matrix \(\hat{H}\)

  • % banded(:,:) :: complex(idp) — Storage for banded data (sparsity_model=='banded' or sparsity_model=='dia')

  • % val(:) :: complex(idp) — Storage for indexed data (sparsity_model=='indexed')

  • % n :: integer — Dimension of underlying Hilbert space

  • % row(:) :: integer — For indexed storage, array of row-indicies

  • % col(:) :: integer — For indexed storage, array of column-indicies

  • % distance(:) :: integer — For dia storage, sub-/super-diagonal numbers

  • % kl :: integer — For banded storage, number of sub-diagonals. Must be zero if hermitian==.true.

  • % ku :: integer — For banded storage, number of super-diagonals the matrix stored in H couples to a pulse

  • % op_type :: character(len=atype_l) — Type of operator represented by the matrix (such as 'pot', 'dip', 'dstark', …). Different types of operators may imply the pulse being connected in different ways.

  • % is_complex :: logical.true. if any of the elements in the matrix have a nonzero imaginary part

  • % sparsity_model :: character(len=sparsity_model_l) — String that describes how the matrix \(\hat{H}\) is encoded.

  • % subspace :: character(len=op_subspace_l) — String indicating the subspace of the total Hilbert space to which the operator should be applied. The availabale subspaces are given by the three spatial dimensions (string: 'spat1', 'spat2', 'spat3'), the spin dimension (string: 'spin') and the surface dimension (string: 'surf'), cf. state type. If the operator should act on the total Hilbert space, the string must be 'total'.

  • % checked :: logical — Flag that is set by the set_op_matrices() routine, to ensure that the op_matrix has been properly inserted into the dynamical generator or Hamiltonian. A user must never insert a op_matrix into a dynamical generator or Hamiltonian directly

  • % spinindex :: spin_index_t — Spin index data structure containing information about allowed spin configurations for an interaction of this operator with a bath of spins

  • % spinham :: spin_couplings_t — Spin part of the operator containing a collection of local and spin-spin interaction operators

  • % pcoup :: pulse_coupling_t — Data structure containing all information regarding the coupling of a pulse to the operator

type  qdyn_def_mod/op_memoize_t[source]

Cache for operator data.

This is used to speed up moving grid calculations by at least a factor of 10.

Type fields
  • % filename :: character(len=file_l) — Name of data file

  • % op_a(:) :: real(idp) — Operator data stored in the file

  • % r(:) :: real(idp) — Grid data stored in the file

type  qdyn_def_mod/op_rational_memoize_t[source]

Cache for potential operators of type 'rational'.

It stores the numerator and denumerator coefficients.

Type fields
  • % filename :: character(len=file_l) — Name of data file

  • % numerators(:) :: real(idp) — nominator coefficients

  • % denominators(:) :: real(idp) — denominator coefficients

type  qdyn_def_mod/para_t[source]

Collection of config file parameters in all sections.

Type fields
  • % runfolder :: character(len=runfolder_l) — Name of runfolder

  • % grid(:) :: grid_pt — Descriptions of spatial grid data

  • % tgrid :: tgrid_pt — Description of time grid data

  • % ham(:) :: ham_pt — Descriptions of Hamiltonians

  • % observables(:) :: observables_pt — Description of observables

  • % dissipator(:) :: dissipator_pt — Descriptions of dissipators

  • % eigensystem(:) :: eigensystem_pt — Descriptions of eigensystems

  • % psi(:) :: psi_pt — Descriptions of wave functions

  • % pulse(:) :: pulse_pt — Descriptions of pulses (controls)

  • % oct :: oct_pt — Description of optimization parameters

  • % prop :: prop_pt — Description of propagation parameters

  • % bwr(:) :: bwr_pt — Description of bandwidth restriction parameters

  • % scattering :: scattering_pt — Description of parameters for scattering calculations

  • % user :: user_pt — User-defined parameters

  • % is_set :: is_set_t — Replication of the para_t structure itself, providing a logical flag for all parameters

  • % sceint :: sceint_pt — Description of parameters for electronic integrals module

type  qdyn_def_mod/prop_pt[source]

Config file parameters for propagation.

Type fields
  • % method :: character(len=method_l) — Method of propagation {‘cheby’|’newton’|’nITO’| ‘rk45’|’exact’}

  • % inhom_method :: character(len=method_l) — Method for inhomogeneous propagation (defaults to prop) {‘cheby’|’newton’|’rk45’}

  • % inhom_max_order :: integer — Maximum order M in the expansion of the inhomogeneous term in the inhomogeneous Chebychev or the ITO propagation [5]

  • % n_taylor :: integer — Order of Taylor expansion in the inhomogeneous propagation for small arguments [20]

  • % rk45_relerr :: real(idp) — Allowed relative error in Runge-Kutta propagation [1.0d-11]

  • % rk45_abserr :: real(idp) — Allowed absolute error in Runge-Kutta propagation [1.0d-15]

  • % newton_relerr :: real(idp) — Minimum Norm of the solution of the Newton series in relation to the correct one. Determines when the series is truncated. [1.0d-13]

  • % newton_norm_min :: real(idp) — Minimum norm of a state before the state is assumed to be identical to zero. This primarily affects the detection of eigenstates. You should only change this (and probably only to a lower value) if the Newton propagator gives wrong results due to assuming a state is an eigenstate when it is not. [1.0d-15]

  • % cheby_prec :: real(idp) — Precision for the Chebyshev propagator. The default value is machine precision [1.d-15] and is set in the subroutine getan.

  • % newton_arnoldi_order :: integer — Dimension of the Hessenberg matrix to be ructed in each restart of the Newton gator [4]

  • % newton_max_restarts :: integer — Maximum number of restarts in the Newton agator [1000]

  • % ITO_guess_method :: character(len=method_l) — Method to use for determing the guess states for the next propagation step within the ITO propagation. Can be either 'hom' (guess states determined through homogeneous propagation) or 'extrapol' (guess states determined through extrapolation from the current step) or 'const'. {‘hom’|’extrapol’|’const’} [‘extrapol’]

  • % ITO_do_iter :: logical — If .false., iterative algorithm in ITO propagation is omitted and convergence after one iteration step is assumed [.true.]

  • % inhom_expan_err :: real(idp) — Absolute error for coefficients in expansion series within inhomogeneous and ITO propagation; coefficient series will be truncated onces falling below this value [1.0d-12]

  • % use_mcwf :: logical — Use the Monte-Carlo wave function (quantum jump) method when propagating in Hilbert space. This requires a dissiaptor to be defined in terms of Lindblad operators, and the Hamiltonian to include a non-Hermitian decay term (see dissipator:add_to_H_jump)

  • % mcwf_order :: integer — If use_mcwf is .true., then mcwf_order can be either 1 (first order) or 2 (second order, default). The first order allows for at most one quantum jump withing a time interval dt, with each jump taking the duration of the entire time step. Second order performs any number of instantaneous jumps within dt. However, it has significantly more overhead than the first order. Thus, for strong decay, it can be numerically more efficient to use the first order MCWF. However, dt must be sufficiently small in this case. [2]

type  qdyn_def_mod/prop_seg_storage_t[source]

Storage container for a series of propagated states.

A subset of the states are kept in memory, the remainder are cached to disk. See module description of qdyn_prop_seg_storage_mod.

Type fields
  • % slot(2) :: prop_seg_t — Array of two slots, for the two segments that are kept in memory

  • % psi_shape(5) :: integer — If the states kept in storage are wave functions (rho==.false.), the shape of each state’s psi component

  • % rho_shape(6) :: integer — If the states kept in storage are density matrices (rho==.true.), the shape of each state’s rho component

  • % grid :: grid_t — The spatial grid on which each state is defined

  • % rho :: logical — Whether or not the stored states are in Liouville space

  • % packed :: logical — If rho==.true. and packed==.true., use packed storage for density matrices, exploiting their Hermiticity to save 50% of RAM and disk resources. Note that not in all cases the propagated matrices are actual density matrices. Specifically, the canonical basis of Liouville space is not Hermitian.

  • % time_i_min :: integer — The smallest time index for which a state has been stored

  • % time_i_max :: integer — The largest time index for which a state has been stored

  • % last_slot :: integer — Which element of slot the last state was stored in, or extracted from. Values are 1 or 2

  • % last_si :: integer — Which storage index in slot(last_slot) the last state was stored in, or extracted from

  • % direction :: integer — During “storing” stage, +1 for forward propagation, -1 for backward; 0 during retrieval stage

  • % nt_seg :: integer — Number of wave functions stored in each segment

  • % n_state_vals :: integer — Number of complex valued entries that make up a state, after reshaping. This is the product of the entries in psi_shape or rho_shape. The shape of slot(i)%data will be (n_state_vals,nt_seg) for i=1 or 2.

  • % nt :: integer — The total number of states the container is set up to store (number of points in the total time grid)

  • % n_segs :: integer — Number of segments necessary to cover the entire time grid.

  • % dump_prefix :: character(len=file_l-6) — Prefix for filename in which segments are cached to disk. When writing out segments, the extension .XXX will be appended to this dump_prefix, where XXX is the seg_index number for that segments.

  • % coord_min(:,:) :: real(idp)coord_min(:,time_i) holds the coord_min component of the state at time index time_i

  • % mom_disp(:,:) :: real(idp)mom_disp(:,time_i) hold the mom_disp component of the state at time index time_i

  • % ram_mb :: integer — Actual amount of RAM used for storage (in MB)

  • % disk_mb :: integer — Actual amount of hard disk space used for storage (in MB)

type  qdyn_def_mod/prop_seg_t[source]

Single storage segment, component of prop_seg_storage_t.

Type fields
  • % data(:,:) :: complex(idp) — Storage for state amplitudes. The (reshaped or packed) amplitudes of the n’th state are in data(:,n).

  • % seg_index :: integer — Index of the segment, out of number of segments necessary to cover the entire time grid. The value is between 1 and the value of the n_segs component of the encompassing prop_seg_storage_t data structure.

type  qdyn_def_mod/prop_work_exp_t[source]

Internal data for calculation of expectation values.

Type fields
  • % state_lab :: state_t — Temporary state that may be used to store the conversion of a rotating-frame state into the lab frame

  • % state_temp :: state_t — Temporary state used in calculation of expectation values

  • % square :: state_t — Temporary state used in calculation of expecation values for the square of observables

  • % observables(:) :: observable_t — Array of observables for which to calculate expectation values

  • % column_labels(:) :: character(len=exp_label_l) — Labels for the columns in values (exlucing unit)

  • % values(:,:) :: complex(idp) — Cached expectation values. The value stored in values(i,j) is the value for the i’th observable, at the j’th value in the time grid.

  • % file_units(:) :: integer — List of the file units that are used for output of expecation values. May contain spurious trailing entries with value -1

  • % skip_row(:) :: logical — Internal buffer to keep track of whether a row of expectation values should be written out

  • % postfix :: character(len=file_l) — A postfix to be appended to the outfile of observables. Its purpose is to allow different processes to write to different files in a parallelized context.

  • % no_output :: logical — If .true., skip writing expecation values entirely

type  qdyn_def_mod/prop_work_t[source]

Collection of internal data for propagation.

Type fields
  • % t :: real(idp) — Absolute time at which the current propagated state is defined. Used in MCWF to determined jump times. Also useful in prop_info_hook.

  • % rwa_vector(:) :: real(idp) — Transformation between rotating frame and lab frame

  • % rwa_t0 :: real(idp) — Time at which the RWA and LAB frames coincide (usually zero)

  • % wnito :: work_nito_t — Internal data for nITO propagation (newITO)

  • % wcheby :: work_cheby_t — Internal data for Chebychev propagation

  • % wnewton :: work_newton_t — Internal data for Newton propagation

  • % wrk45 :: work_rk45_t — Internal data for Runge-Kutta propagation

  • % wexact :: work_exact_t — Internal data for exact propagation

  • % movgrid :: work_movgrid_t — Internal data for propagation with a moving grid

  • % exp :: prop_work_exp_t — Internal data for expectation values

  • % mcwf :: mcwf_work_t — Internal data for Monte-Carlo Wave Function (MCWF) lmethod

  • % hook_data :: hook_data_t — Extra data for built-in propagation info-hooks. These should be set “manually” by the calling program if a built-in hook is used

type  qdyn_def_mod/psi_pt[source]

Specification of a wave function.

To initialize multiple wave functions, they must be distinguished by their label, and the program processing the config file must call the init_psi routine multiple times, as appropriate.

To initialize a wave function in the context of a molecular multi-surface system, the wave function is specified per surface, with each line describing one of the surfaces. The type parameter in this case is either 'file' to load the wave function from filename, 'diag' to numerically determine an eigenstate of the the surface, or one of 'const', 'hamos' (harmonic osciallator eigenfunction), or 'gauss' to set the wave function analytically. When loading from file, the file is expected to contain the grid coordinate in the first column and the real and imaginary part of the wave function amplitudes in the second and third column

To initialize a wave function for a system written in the energy basis (without a spatial grid), it is easiest is to set type=='file' in order to read the entire wave function from a file. The psi section in this case should only contain a single line. Whenever type=='file' is specified and no value for surf is given, the file is expected to take a 1-based integer index (the index of the energy level) in the first column, and the real part of the probability amplitude for that level in the second columns. The amplitude for levels not contained in the file is set to zero (i.e., the file may use a sparse format that only lists non-zero values) Optionally, a third column may contain the imaginary part of the amplitude. As an alternative to reading from file, if the dimension of the Hilbert space is small, it is also possible to specify the amplitude for each energy level with a separate line in the config file. In this case, type=='const' should be used, the absolute value of the amplitude should be given as a, and the complex phase as phase. Wave functions are automatically normalized during initialization, so the values of a may be given only relative to each other.

There is no special support for initializing a wave function in a Hilbert space with more than one spatial dimension. The only exception to this is type=='diag_njm' for spherical coordinates, which initializes to an eigenstate in \(r\), and an analytic polar eigenfunction \(Y_{l,m}(\phi, \theta)\) for the angular coordinates. Apart from that, “complicated” wave functions must be generated programatically. By specifying type=='zero, a wave function is allocated, but the amplitude is initialized to zero. A program should then overwrite the amplitude in any desired way. If constructing the wave function is numerically expensive, one option is to write to to a file. If this is done using the dump_state_t routine, the resulting binary file could be loaded directly in another config through type=='dump'. Lastly, type=='file' might be used initialize from ASCII data. While primarily intented to initialize wave functions for systems defined in the energy basis (without a spatial grid), if there are multiple degrees of freedom, the index in the first column of the input file refers to the position in memory. Thus, with knowledge of the internal memory layout of the psi component of the state_t type, is is possible to initialize arbitrary wave functions. This option is especially useful when the wave function is generated completely outside of QDYN, e.g. in a script.

Type fields
  • % type :: character(len=atype_l) — Type of the wave function {‘const’|’diag’|’diag_njm’| ‘zero’|’gauss’|’hamos’|’file’|’dump’}

  • % label :: character(len=label_l) — Label or system for which the wave function is defined.

  • % phase :: real(idp) — Phase in units of \(\pi\) for a phase factor \(\exp(\text{phase} \cdot \pi)\).

  • % fromE :: real(idp) — If type is ‘diag’, the energy threshold from which to count the eigenstates [-huge(zero)]

  • % r_0 :: real(idp) — If type is 'gauss' or 'hamos', central position of peak

  • % k_0 :: real(idp) — If type is 'gauss', central frequency of peak

  • % w_0 :: real(idp) — If type is 'hamos', harmonic frequency (per mass unit)

  • % sigma :: real(idp) — If type is 'gauss', standard deviation of peak

  • % j :: integer — If coord is 'spherical' and type is 'diag_njm', the rotational quantum number

  • % m :: integer — If coord is 'spherical' and type is 'diag_njm', the magnetic quantum number

  • % n :: integer — If type is 'diag', the number of the eigenfunction (relative to fromE) that is to be used [1]

  • % surf :: integer — Surface for which the parameters are valid [1]

  • % spin :: integer — Spin variable for which the parameters are valid [1]

  • % filename :: character(len=file_l) — If type is 'file' or 'dump', name of the file from which the wave function should be read

  • % a :: real(idp) — If type is 'const', constant value of the amplitude

type  qdyn_def_mod/pulse_coupling_t[source]

Describes the coupling of any operator to a set of pulses \(\{\epsilon_{k}(t)\}\).

If dep_func is not pointing at an analytical function \(f(\{\epsilon_{k}(t)\})\), the coupling is assumed to be of the form \(\op{O} \epsilon^{n}(t)\) with only a single pulse dependency and \(n\) the photon number involved in the transition.

Type fields
  • % n_photons :: integer — In case of pulse coupling without an analytical function dep_func, this defines the number of photons involved in the transition, i.e., \(\epsilon^{n}(t)\)

  • % conjg_pulse :: logical — If .true., couple to the complex conjugate of the pulse instead of the original pulse value (if dep_func is set, the effective pulse value is given by \(f*(\{\epsilon_{k}(t)\})\))

  • % pulse_ids(:) :: integer — List of pulse IDs to which the operator couples. In case of standard coupling with dep_func not associated, should be of length 1 and its value should be the pulse ID to which the operator couples (0 in case of no coupling). If dep_func is associated, the operator can couple via a functional dependency to arbitrary many different(!) pulses, whose IDs are stored in pulse_ids. Note that they can be in any order but double occurance of one ID is NOT checked

  • % dep_func_set :: logical — Logical indicating whether dep_func should have been set and be used (safety reasons due to a compiler error in ifort)

type  qdyn_def_mod/pulse_distortion_t[source]

General type extension for distorted pulses.

This type saves all relevant information if and how the pulse is distorted.

Type fields
  • % E_raw(:) :: complex(idp) — Raw pulse values before distortion

  • % transfer_function(:) :: complex(idp) — Transfer function for distorting the pulse by convolving it with such function

type  qdyn_def_mod/pulse_oct_t[source]

Collection of optimization data for a pulse.

Type fields
  • % shape(:) :: real(idp) — Array of shape values

  • % filter(:) :: real(idp) — Spectral filter, applied to the guess pulse in each OCT iteration. Must contain values between 0 and 1, and be symmetric around zero. It must follow the memory layout described in pulse_to_frequency(). The filter is applied by transforming the pulse to frequency domain after each OCT iteration, multiplying each value in pulse%E with the corresponding value in pulse%oct%filter, and transforming the pulse back to time domain.

  • % lambda_a :: real(idp) — Scaling parameter for Delta-epsilon-squared penalty in Krotov

  • % lambda_intens :: real(idp) — Scaling parameter for intensity penalty in Krotov

  • % increase_factor :: real(idp) — Factor by which you allow the pulse intensity to rease during one OCT step

  • % pulse_max :: real(idp) — Maximum pulse amplitude of optimized pulse, enforced either by truncation (only if para%oct%limit_pulses is .true.) or by parametrization

  • % pulse_min :: real(idp) — Minimum pulse amplitude of optimized pulse

  • % optimize :: logical — Flag indicating whether the given pulse should be optimized

  • % w_L_max :: real(idp) — Upper limit for the frequency component of the optimized pulse when para%oct%method == 'SPa'.

  • % w_L_min :: real(idp) — Lower limit for the frequency component of the optimized pulse when para%oct%method == 'SPa'. In the case w_L_min == w_L_max for a pulse i, the SPa algorithm will fix the frequency of that pulse to the frequency value defined by the user and will optimize the remaining pulse parameters.

  • % phi_max :: real(idp) — Upper limit of the carrier envelope phase (CEP) of the optimized pulse when para%oct%method=='SPa'.

  • % phi_min :: real(idp) — Lower limit of the carrier envelope phase (CEP) of the optimized pulse when para%oct%method=='SPa'. If phi_min == phi_max, the SPa algorithm will fix the optimized pulse CEP to the value defined by the user and will optimize the remaining pulse parameters.

  • % fwhm_max :: real(idp) — Upper limit of the full width at half maximum (FWHM) of the optimized pulse if para%oct%method == 'SPa'.

  • % fwhm_min :: real(idp) — Lower limit of the full width at half maximum (FWHM) the optimized pulse when para%oct%method == 'SPa. If fhwm_min == fwhm_max, the SPa algorithm will fix the optimized pulse FWHM to the value defined by the user and will optimize the remaining pulse parameters.

  • % t_0_max :: real(idp) — Upper limit of the peak time of a Gaussian pulse for the optimized pulse if para%oct%method == `SPa.

  • % t_0_min :: real(idp) — Lower limit of the peak time of a Gaussian pulse for the optimized pulse if para%oct%method == `SPa. If t_0_min == t_0_max, the SPa algorithm will fix the optimized pulse t_0 to the value defined by the user and will optimize the remaining pulse parameters.

  • % outfile :: character(len=file_l) — Name of the file to which the optimized pulse should be written.

  • % outfile_param :: character(len=file_l) — Name of the file to which the optimized pulse parameters should be written when using the spa method for optimization.

  • % time_unit :: character(len=unit_l) — Unit for the time grid in pulses that are written out

  • % ampl_unit :: character(len=unit_l) — Unit for the amplitudes in pulses that are written out

  • % parametrization :: character(len=paramzn_l) — Name of a pulse parametrization model. Possible values are 'square', 'tanh'

  • % filter_frq_thld :: real(idp) — Threshold for the allowed differences between the spectral filter frequencies read from the file and those calculated internally. This flag can be set in the config file and defaults to 1E-12.

type  qdyn_def_mod/pulse_pt[source]

Config file information of a single pulse.

This can be parametric or from a file. The actual numerical pulse is the sum of all defined pulses.

Type fields
  • % type :: character(len=atype_l) — Type of pulse {‘gauss’|’blackman’|’lorentz’| ‘rectangular’|’chirped_gauss’|’file’|’const’| ‘zero’|’tchirped_gauss’}

  • % t_start :: real(idp) — Time at which a windowed pulse should start (\(t_0 - 4\sigma\) of Gaussian pulse)

  • % t_stop :: real(idp) — Time at which a windowed pulse should end (\(t_0 + 4\sigma\) of Gaussian pulse)

  • % t_0 :: real(idp) — Peak time of Gaussian pulse

  • % t_FWHM :: real(idp) — FWHM of Gaussian pulse; it relates to the standard deviation as \(\sigma = \frac{1}{2} \, \frac{t_{\fwhm}}{\sqrt{2\ln(2)}}\)

  • % E_0 :: real(idp) — Peak amplitude of Gaussian pulse (chirped or non-chirped), or value of constant pulse.

  • % w_L :: real(idp) — Frequency of Gaussian pulse

  • % chirprate :: real(idp) — Chirprate for chirped Gaussian

  • % dp_separation :: real(idp) — Pulse separation for triangularily chirped Gaussians

  • % w_flip :: real(idp) — Sign flip point of phase for triangularily chirped Gaussians

  • % w_step :: real(idp) — Step position for phase shaping

  • % delay :: real(idp) — Period between \(t_0\) and the peak of the first Gaussian pulse. This is only valid for pulses subsequent to the first one, and only if the first pulse is Gaussian.

  • % scale :: real(idp) — Factor by which to scale the pulse. This also affects all previous pulses in the para%pulse array.

  • % phi :: real(idp) — Relative phase

  • % oct_lambda_a :: real(idp) — Scaling parameter for Delta-epsilon-squared penalty in Krotov. It is also used for scaling the gradient in LBFGS optimization [zero]

  • % oct_lambda_intens :: real(idp) — Scaling parameter for intensity penalty in Krotov [zero]

  • % oct_increase_factor :: real(idp) — Factor by which you allow the pulse intensity to increase during one OCT step

  • % oct_pulse_max :: real(idp) — Upper limit for amplitude. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the upper limit if using the tanh parametrization

  • % oct_pulse_min :: real(idp) — Lower limit for amplitude. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the lower limit if using the tanh parametrization

  • % oct_w_L_max :: real(idp) — Upper limit for frequency. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the upper limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_w_L_min :: real(idp) — Lower limit for frequency. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the lower limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_FWHM_max :: real(idp) — Upper limit for FWHM. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the upper limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_FWHM_min :: real(idp) — Lower limit for FWHM. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the lower limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_t_0_max :: real(idp) — Upper limit for t_0 for each subpulse. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the lower limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_t_0_min :: real(idp) — Lower limit t_0 for each subpulse. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the lower limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_phi_max :: real(idp) — Upper limit for CEP phase. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the upper limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_phi_min :: real(idp) — Lower limit for CEP phase. The optimized pulse will be truncated at the given value if para%oct%limit_pulses is .true.. Also used as the lower limit if using the tanh parametrization and if para%oct%method=='SPa'

  • % oct_shape :: character(len=atype_l) — Type of shape to be used {‘sinsq’|’file’| ‘flattop’|’const’|’zero’}

  • % oct_parametrization :: character(len=paramzn_l) — Parametrization model {‘square’|’tanh’}

  • % is_complex :: logical — If true, the pulse will be properly treated as a complex quantity for optimization

  • % shape_t_start :: real(idp) — Time at which the oct shape starts. If not defined explicitly, this defaults to the value of t_start. If that’s not present either, it defaults to t_start of the time grid.

  • % shape_t_stop :: real(idp) — Time at which the oct shape ends. If not defined explicitly, this defaults to the value of t_stop, or t_stop of the time grid.

  • % ftbaseline :: real(idp) — Baseline if oct_shape == 'flattop'

  • % t_rise :: real(idp) — In flattop shape, time to go from ftbaseline to 1 (starting at shape_t_start)

  • % t_fall :: real(idp) — In flattop shape, time to go from 1 to to ftbaseline (finishing at shape_t_stop)

  • % oct_shapefile :: character(len=file_l) — if octshape is ‘file’, name of file to read shape from

  • % oct_outfile :: character(len=file_l) — Name of the file to which the optimized pulse

  • % oct_outfile_param :: character(len=file_l) — Name of the file to which the optimized pulse parameters should be written when using the spa method for optimization. should be written.

  • % oct_spectral_filter :: character(len=file_l) — Name of a file from which a spectral filter should be read. The file must contain two columns: the frequency, and a filter function \(\in [0, 1]\) for each value in the spectrum. The filter must be given first for the positive, then for the negative frequencies, corresponding to the output of pulse_to_frequency. It is recommended to generate the filter via Python, through the qdyn.pulse.Pulse.write_oct_spectral_filter() method.

  • % oct_specfil_frq_thld :: real(idp) — Threshold for the allowed differences between the spectral filter frequencies read from the file and those calculated internally [1e-12]

  • % id :: integer — Integer ID of the pulse

  • % filename :: character(len=file_l) — Filename for pulse from file

  • % time_unit :: character(len=unit_l) — Unit of time grid in file; Also optimized pulses will be written in this time unit [‘iu’]

  • % ampl_unit :: character(len=unit_l) — Unit of amplitude from file; Also used for optimized pulses [‘iu’]

  • % check_tgrid :: logical — When reading a pulse from file, QDYN will check whether the time grid of the pulse (first column in the file) matches the global time grid. If check_tgrid is set to .false., the pulse values are read in without any such check [.true.]

  • % rwa :: logical — Should pulse be constructed in the RWA (i.e. with w_L assumed zero and amplitude reduced by factor 1/2)

  • % optimize :: logical — Flag indicating whether the pulse should be optimized [.true.]

  • % transf_func_file :: character(len=file_l) — If present, name of the file containing the transfer function for distorting the pulse.

type  qdyn_def_mod/pulse_t[source]

Numerical pulse. Pulses can be both in the time domain or in the frequency domain. Note that conceptually, the values of the pulse are located between the points of the time grid (i.e. the number of values in the pulse is \(nt-1\), and when written out, the pulse values will be shifted by \(dt/2\) relative to the time grid).

              pulse values (pulse%E)     nt_pulse = size(pulse%E) = 5
              /   \
time grid:  | * | * | * | * | * |        tgrid%nt = 6
            ^                   ^
            tgrid_int%t_start   tgrid_int%t_stop
Type fields
  • % E(:) :: complex(idp) — Field amplitudes of the pulse. If the pulse is in the time domain, this contains the complex amplitudes of the pulse for the period \([t_{\text{start}}, t_{\text{stop}}]\). For a transformed pulse (in the frequency domain), pulse%E contains the complex amplitudes of the frequency components, ordered in the following way: First, the values for \([0, \omega_{\max}]\). Then, the values for \([-\omega_{\max}, 0)\), with \(\omega_{\max} = 1/dt\)

  • % is_complex :: logical — If .true., the imaginary part of the pulse is taken into account (especially relevant for optimization)

  • % in_time :: logical — Pulse is in time domain (frequency domain if .false.)

  • % E_max :: real(idp) — Maximum field amplitude (real part)

  • % E_abs_max :: real(idp) — Maximum absolute field value

  • % E_min :: real(idp) — Minimum field amplitude (real part)

  • % E_abs_min :: real(idp) — Minimum absolute field value

  • % oct :: pulse_oct_t — Collection of optimization data for a pulse

  • % distortion :: pulse_distortion_t — Special parameter for general distorted pulses. See documentation of pulse_distortion_t

type  qdyn_def_mod/scattering_pt[source]

Config file parameters for scattering calculations.

A scattering calculation is set up by specifying

  • the type of the collision with the system option,

  • the method that shall be used to solve the scattering problem,

  • scattering potentials and couplings defined as operators in the ham section,

  • the entrance channel via entrance_surface or entrance_channel,

  • the spatial grid via the grid section,

  • the collision energy,

  • and additional optional and non-optional parameters and quantum numbers to be taken into account (such as l_max, l etc).

Based on the type of the collision and the given channels, additionally relevant channels are identified and initialized automatically, such that the total number of channels may be different from the number of operators defined in the ham section.

Supported scattering systems are:

  • system='ham': Collision with the Hamiltonian as defined in the ham section. This allows to define an arbitrary collision without any channels or couplings added automatically. Only the information from the ham section is used for determining the scattering channels in the sense that each surface (defined via ham:op_surf) is considered a channel. Only operators of type=='op' are taken into account. No additional channels or couplings are added by the program.

    For each channel you need to specify the partial wave quantum number as ham:rotbarr_j.

  • system=='atom-atom': Atom-atom scattering, possibly including coupling between electronic and nuclear spins, hyperfine interaction or spin-orbit interaction. For initilizing spin-orbit interaction, the coupling need to be defined with op_type=='so' in the ham section.

    It is also possible to initialize coupling to a static or non-resonant electric field or a static magnetic field.

    You need to specify the maximum partial wave that shall be considered via l_max. It is recommended to also specify other angular momentum quantum numbers explicitly (such as l or ml). All quantum numbers that are not given explicitly are assumed to be zero.

Warning

With the current implementation, the hypterfine structure is neglected in atom-atom scattering, if spin-orbit coupling is initialized.

For all scattering systems, the index of the entrance channel potential on the ham section can be given with entrance_surf. The entrance channel is than taken to be the first channel associated with this potential. Alternatively, entrance_channel can be used to specify the final index of the entrance channel (after all additional channels are added by the program) directly. If neither of these two options is set, the entrance channel potential is taken to be the first entry in the ham section.

The scattering calculation can be performed for a set of collision energies. For the Numerov method, specify E_min, E_max and nE together with E_grid_type. Alternatively, you can read a list of collision energies from a file by setting E_grid_type=='file' and specifying filename (and optionally energy_unit). If only a single collision energy is desired, energy can be specifed directly. If method is set to 'diag', the collision energies are given by the eigenenergies of the Hamiltonian. In this case, specify E_min and E_max to select the energy range that you are interested in.

Note

In all cases collision energy is taken to be defined with respect to the asymptotic energy of the entrance channel potential.

Warning

With method=='diag', the collision energies are determined as the eigenenergies of the Hamiltonian for each set of coupled channels individually. Hence, several channels may have different energy grids associated to them. With the current implementation, a common energy grid is defined with reference to the entrance channel by always selecting the closest energy from the other channels. Increase the extent of the spatial grid, in order to obtain a denser energy spectrum and decrease the error introduced by matching the energies.

By default, QDYN only calculates and saves scattering cross sections. Additional scattering observables can be obtained by setting the following options to true: wavefunctions, diff_cross_sections, scat_phase and scat_length.

Note

The scattering method 'diag' is currently only implemented for elastic scattering of uncoupled scattering channels. And the channels need to have the same asymptotic energies.

Type fields
  • % method :: character(len=method_l) — Name of method to use for scattering calculations {‘numerov’|’diag’}

  • % system :: character(len=label_l) — The system for which to perform the scattering caclulations {‘atom-atom’|’atom-diatom’|’ham’}

  • % energy :: real(idp) — Energy of the collision, with respect to the asymptote of the entrance channel

  • % E_min :: real(idp) — Minimum scattering energy for which to perform scattering calculations

  • % E_max :: real(idp) — Maximum scattering energy for which to perform scattering calculations

  • % nE :: integer — Number of scattering energies for which to perform scattering calculations

  • % E_grid_type :: character(len=coord_type_l) — Type of the scattering energy grid. Possible values are {‘lin’|’log’|’file’}

  • % filename :: character(len=file_l) — File from which to read scattering energies, if E_grid_type=='file'. The file must contain only a single column of collision energies. The energy unit can be specified with energy_unit. By default, they are assumed to be given in internal units.

  • % energy_unit :: character(len=unit_l) — Unit of collision energies in input file if E_grid_type=='file' [‘iu’]

  • % I :: real(idp) — Intensity of the non-resonant field

  • % B_static :: real(idp) — Static magnetic field

  • % E_static :: real(idp) — Static electric field

  • % g1 :: real(idp) — Nuclear g-factor of 1st atom

  • % g2 :: real(idp) — Nuclear g-factor of 2nd atom

  • % A1 :: real(idp) — Hyperfine coupling constant of 1st atom

  • % A2 :: real(idp) — Hyperfine coupling constant of 2nd atom

  • % zeta1 :: real(idp) — Interaction-variation of hyperfine coupling constant of 1st atom \(\zeta_1 \exp\left(-\beta_1 (R-R_1)^2\right)\)

  • % beta1 :: real(idp) — Interaction-variation of hyperfine coupling constant of 1st atom \(\zeta_1 \exp\left(-\beta_1 (R-R_1)^2\right)\)

  • % R1 :: real(idp) — Interaction-variation of hyperfine coupling constant of 1st atom \(\zeta_1 \exp\left(-\beta_1 (R-R_1)^2\right)\)

  • % zeta2 :: real(idp) — Interaction-variation of hyperfine coupling constant of 2nd atom \(\zeta_2 \exp\left(-\beta_2 (R-R_2)^2\right)\)

  • % beta2 :: real(idp) — Interaction-variation of hyperfine coupling constant of 1st atom \(\zeta_2 \exp\left(-\beta_2 (R-R_2)^2\right)\)

  • % R2 :: real(idp) — Interaction-variation of hyperfine coupling constant of 1st atom \(\zeta_2 \exp\left(-\beta_2 (R-R_2)^2\right)\)

  • % i1 :: real(idp) — Nuclear spin of 1st atom

  • % s1 :: real(idp) — Electronic spin of 1st atom

  • % i2 :: real(idp) — Nuclear spin of 2nd atom

  • % s2 :: real(idp) — Electronic spin of 2nd atom

  • % mi1 :: real(idp)\(z\)-projection of nuclear spin of 1st atom for entrance channel

  • % mi2 :: real(idp)\(z\)-projection of nuclear spin of 2nd atom for entrance channel

  • % ms1 :: real(idp)\(z\)-projection of electronic spin of 1st atom for entrance channel

  • % ms2 :: real(idp)\(z\)-projection of electronic spin of 2nd atom for entrance channel

  • % l :: integer — Angular momentum of entrance channel

  • % ml :: integer\(z\)-projection angular momentum for entrance channel

  • % entrance_surf :: integer — Number of electronic surface for entrance channel [1]

  • % entrance_channel :: integer — Number of entrance channel. Overwrites entrance_surf, if specified in the config file (i.e. if para%is_set%scattering%entrance_channel is .true.)

  • % l_max :: integer — Maximum partial wave in calculations

  • % ntheta :: integer — Number of polar angles on which to print the differential cross section

  • % coup_al :: logical — If .true. then coupling by non-resonant field included

  • % coup_d :: logical — If .true. then coupling by static electric field included

  • % coup_i1s1 :: logical — If .true. then coupling between nuclear spin on atom 1 and electronic spin on atom 1 included

  • % coup_i2s2 :: logical — If .true. then coupling between nuclear spin on atom 2 and electronic spin on atom 2 included

  • % coup_i2s1 :: logical — If .true. then coupling between nuclear spin on atom 2 and electronic spin on atom 1 included

  • % coup_s1s2 :: logical — If .true. then coupling between electronic spin on atom 1 and electronic spin on atom 2 included

  • % coup_sl :: logical — If .true. then coupling between electronic spin and mechanical rotation included

  • % wavefunctions :: logical — If .true. then calculate and write scattering wavefunction

  • % scat_length :: logical — If .true., calculate and write scattering lengths. Real and imaginary parts are stored in separate files

  • % scat_phase :: logical — If .true., calculate and write scattering phase shifts

  • % diff_cross_section :: logical — If .true., calculate and write the differential cross section

  • % wigner_tables :: logical — If true., use hash tables for wigner symbols. This may increase performance, if large numbers of Wigner symbols need to be calculated

type  qdyn_def_mod/scattering_work_t[source]

Collection of internal data and work arrays for scattering calculations.

In particular, the scattering observables are stored in this type.

Type fields
  • % energies(:) :: real(idp) — Collision energies

  • % coupled_channels(:,:,:) :: real(idp) — The full scattering potential on the grid, including all potentials and couplings

  • % wchannels :: work_channels_t — Internal data for channel coupling calculation

  • % wnumerov :: work_numerov_t — Internal data for Numerov method

  • % S(:,:,:) :: complex(idp) — Array of \(S\) matrices for all collision energies

  • % delta(:,:) :: real(idp) — Array of scattering phases in radians

  • % dcs(:,:) :: real(idp) — Differential cross section

  • % theta(:) :: real(idp) — Polar angles on which the differential cross section is defined, in radians

  • % a(:,:) :: complex(idp) — Array of scattering lengths

  • % el(:,:) :: real(idp) — Array of elastic cross sections

  • % inel(:,:) :: real(idp) — Array of inelastic cross sections. The order of the channels on the first dimension is as follows (for a three-channel example): 1-1, 1-2, 1-3, 2-2, 2-3, 3-3

  • % tot_el(:) :: real(idp) — Total elastic cross section

  • % tot_inel(:) :: real(idp) — Total inelastic cross section

  • % psi(:) :: state_t — Array of scattering wavefunctions

type  qdyn_def_mod/sce_int_grid_t[source]

Contains the electron integrals in a FEDVR and Sph Harm basis.

This type contains the radial part of the one and two electron integrals in a basis of FEDVR functions, and the angular part in a basis of spherical harmonics. These objects are then used to compute the electron integrals in a orbital basis.

Type fields
  • % one_e_rad_int(:,:,:) :: real(idp)

    Stores single–center 1e Radial Integrals in radial basis for different values of angular momentum l. Two index account for the radial basis function (or grid point) k_a and k_b, the third accounts for the angular momentum l:

    one_e_rad_int(ka,kb,l)
    

  • % two_e_rad_int(:,:,:) :: real(idp)

    Stores single–center 2e Radial Integrals in radial basis for diff values of angular momentum l. Two index account for the radial basis function (or grid point) ka and kc, the third accounts for the angular momentum l:

    two_e_rad_int(ka,kc,l)
    

    Note that only 2 radial basis functions instead of 4 are used, since symmetry restrictions impose:

    two_e_rad_int(ka,kc)=
    two_e_rad_int(ka,kb,kc,kd)*$\delta_{k_a,k_b}$
                              *$\delta_{k_c,k_d$
    

  • % integrals_ang(:,:,:,:,:) :: complex(idp)

    Single–center 2e Angular integrals in Spherical Harmonics basis. Contains the product of 2 Gaunt coefficients with the 2nd index labeled l

    \[y^{l}(l_1m_1,l_2m_2,l_3m_3,l_4m_4))= y_{l_1m_1,lm_1-m_2,l_2m_2} *\bar{y}_{l_3m_3,lm_4-m_3,l_4m_4}\]

    The indices run as:

    integrals_ang(2*l_max+1,lmax^2,lmax^2,lmax^2,
                  lmax^2)
    

  • % prim_field_ints(:,:,:,:) :: complex(idp) — Field Integrals in FEDVR basis

type  qdyn_def_mod/sce_int_orb_t[source]

Contains the orbital representation of the integrals of a many e- system.

Type fields
  • % n_spatial_orbs :: integer — Maximum number of orbital basis elements

  • % spatial_orb_ind(:,:,:) :: integer

    If in hydrogenoid orbital representation, it encodes an orbital id number based on the usual quantum numbers n,l,m:

    • e.g.: if spatial_orb_ind(n,l,m)=42 then the orbital n,l,m is the 42nd to be accessed in one_eints.

    If in primitive FEDVR/SphHarm representation, then n=1 and spatial_orb_ind(1,l,m)==l.

    • e.g.: spatial_orb_ind(1,l,m)=12 means that the element two_eint(k1,12,lm2,k2,lm3,lm4) has quantum numbers l1=l and m1=m

  • % one_eints(:,:) :: real(idp) — 2D Array containing the 1e integrals in basis of hidrogenoid orbitals or mixed FEDVR/SphHarm. Elements labeled according to SpatialOrbInd.

  • % two_e_rad_orb_ints(:,:,:,:,:) :: real(idp) — Array containing the 2e Radial Integrals in the basis of hydrogenoid orbitals. The first four indices are combined indices defining the radial and angular quantum numer of each one of the four orbitals in the integral, the last index for the value of the rotational barrier (l_ham).

  • % two_eints(:,:,:,:) :: real(idp) — Array containing the full 2e integrals in basis of hidrogenoid orbitals. Elements labeled accord- ing to spatial_orb_ind

  • % ptwo_eints(:,:,:,:,:,:) :: real(idp)

    Array containing the 2e integrals in the primitiv FEDVR/SphHarm orbital representation. Elements labelled according to:

    prim_two_eints(k1,lm1,lm2,k2,lm3,lm4)
    

    where lm1, etc are given by spatial_orb_ind

  • % sptwo_eints :: sparse_tensor_t — Sparse tensor representation of the two-electron integrals, indexed according to spatial_orb_ind, real

  • % csptwo_eints :: sparse_ctensor_t — Sparse tensor representation of the two-electron integrals, indexed according to spatial_orb_ind, complex

type  qdyn_def_mod/sceint_pt[source]

Config file parameters for electronic integrals.

Type fields
  • % l_max :: integer — Number of maximum angular momentum in sph coord 0<l<l_max

  • % Z :: integer — Nuclear Charge

  • % numeric_2e :: logical — Radial 2e integrals computed by direct numeric integration (T) or Poisson formula (F) [.false.]

  • % orbital_ints :: logical — Combines the solution of the Radial Schr Eq and the angular part to obtain orbital representation of the Hamiltonian (T) or keep the Radial and angular parts separated (F) [.true.]

  • % imag_spharm :: logical — Radial Integrals represented in a basis of Imaginary (T) or real (F) Spherical Harmonics [.false.]

  • % prim_integrals :: logical — Radial Integrals represented in a basis of FEDVR functions (T) or in a basis of eigenfunctions of the radial Schrodinguer Equation for the H atom (F) [.false.]

  • % n_max :: integer — Maximum number of the level quantum number, n, to be considered in the orbital representation in an hydrogenoid basis.

  • % n_frozen :: integer — Number of Frozen orbitals, for electronic integrals output

  • % field_comp :: character(len=sce_fcomp_l) — Component of the field {‘X’|’Y’|’Z’|’XY’|’XZ’|’YZ’|’XYZ’|’’}

  • % field_gauge :: character(len=sce_fgauge_l) — Gauge of the field {‘’|’length’|’velocity’}

type  qdyn_def_mod/spa_work_t[source]

Collection of internal data for SPa optimization.

The SPa method minimizes a final-time cost functional J_T.

Type fields
  • % optimize_ampl(:) :: logical — Logical array that specifies whether the amplitude of the pulse(i) must be optimized or kept unchanged.

  • % optimize_freq(:) :: logical — Logical array that specifies whether the frequency of the pulse(i) must be optimized or kept unchanged.

  • % optimize_cep(:) :: logical — Logical array that specifies whether the CEP of the pulse(i) must be optimized or kept unchanged.

  • % optimize_fwhm(:) :: logical — Logical array that specifies whether the FWHM of the pulse(i) must be optimized or kept unchanged.

  • % optimize_t_0(:) :: logical — Logical array that specifies whether the time peak of the Gaussian pulse(i) must be optimized or kept unchanged. Relevant when e.g. optimizing the time-delay between two or more pulses

  • % newpulse(:) :: pulse_pt — Type structure containing the updated pulse field parameters

  • % targets(:) :: oct_target_t — Type structure for local use in fsub function

  • % fw_states_T(:) :: state_t — Temporary target states obtained with the updated pulse

  • % newpulses(:) :: pulse_t — Temporary pulses defined by the updated pulse parameters that stored and used for propagation

  • % optimalpulses(:) :: pulse_t — Optimized pulses resulting from optimization

  • % optimal_fw_states_T(:) :: state_t — Optimized forwarded propagated states resulting from optimization

  • % optimal_oct_iter :: integer — Defines the iteration number, i.e. number of functional evaluations for which the final-time cost functional reaches its minimum

  • % fval :: real(idp) — Value of the functional at the minimizer

  • % oct_iter :: integer — Integer counting the number of propagations

type  qdyn_def_mod/sparse_ctensor_t[source]

Sparse representation of an arbitrary rank complex Tensor.

The tensor is in coordinate form: for a \(k$th order tensor with $nnz\) nonzero values, vals(p) contains the ith nonzero value, and indices(i,p) the value of the ith index of the tensor corresponding to the pth nonzero value.

Type fields
  • % nnz :: integer — Number of nonzero values of the tensor

  • % k :: integer — Rank of the tensor

  • % dim(:) :: integer — 1d array of size \(k\) containing the size of the $i$th dimension of the tensor

  • % vals(:) :: complex(idp) — Array containing the nonzero values, size=`nnz`

  • % indices(:,:) :: integer — Array containing the indices of the nonzero values,

type  qdyn_def_mod/sparse_tensor_t[source]

Sparse representation of an arbitrary rank real Tensor.

The tensor is in coordinate form: for a \(k$th order tensor with $nnz\) nonzero values, vals(p) contains the ith nonzero value, and indices(i,p) the value of the ith index of the tensor corresponding to the pth nonzero value.

Type fields
  • % nnz :: integer — Number of nonzero values of the tensor

  • % k :: integer — Rank of the tensor

  • % dim(:) :: integer — 1d array of size \(k\) containing the size of the $i$th dimension of the tensor

  • % vals(:) :: real(idp) — Array containing the nonzero values, size=`nnz`

  • % indices(:,:) :: integer — Array containing the indices of the nonzero values,

type  qdyn_def_mod/sph_harm_t[source]

Contains the dimensions of orbital and magnetic quantum numbers for the multipole expansion.

Type fields
  • % n_l :: integer — Number of maximum L quantum number included in the multipole expansion

  • % n_mp :: integer — Orders of the multipole included in the expansion for the m quantum number

  • % n_m(:) :: integer — Array containing the number of m quantum numbers for each l+1, e.g. n_m(3)=5 (b/c l=2 has 3 possible values of m)

  • % m_init(:) :: integer — Array containing the smallest value of (m-1) for a given l+1, e.g. n_m(3)=-3

type  qdyn_def_mod/spin_couplings_t[source]

Data structure containing all information for the total spin operator.

It consists of multiple single spin operators defined by the spin_ops array.

Type fields
  • % spin_ops(:) :: spin_op_t — Array of spin operators

  • % n_spins :: integer — Total number of spins

  • % is_per :: logical — True if spin-spin couplings are periodic along each direction

type  qdyn_def_mod/spin_index_t[source]

Spin index variable listing allowed spin configurations.

Contains the ind array listing all the integers corresponding to the available spin configurations given by all allowed excitation numbers. The possibility for the excitation number to vary within the range n_ex_min to n_ex_max is allowed in which case the components of the ind array are ordered by increasing n_ex. A general form looks like

\[\mathbf{ind} = \left( c_{1}, ..., c_{N_1}, c_{N_1+1}, ..., c_{N_2}, ..., c_{N_k+1}, ..., c_N \right)\]

where \(c_{i}, i=1,...,N\) correspond to the allowed spin configurations. There are \(N_1\) configuration with total excitation n_ex(1), \(N_2-N_1\) configurations with n_ex(2), etc.

Type fields
  • % ind(:) :: integer(ilng) — Array containing integers corresponding to the allowed spin configurations. This array is sorted in accordance with array n_ex, such that first all spin configurations corresponding to n_ex(1) are contained in ascending order, afterwards all spin configurations corresponding to n_ex(2) in ascending order, etc.

  • % n_spins :: integer — Total number of spins

  • % n_ex_min :: integer — Minimum number of excitations

  • % n_ex_max :: integer — Maximum number of excitations

  • % size_ind :: integer — Total number of spin configurations (equal to size(ind))

  • % step_ex(:) :: integer — Array containing the distance between two consecutive excitations in array n_ex. If all excitations are equally separated, only one number needs to be stored. For more complex allowed excitations, e.g., n_ex = (0,1,3,4) in case of n_spins=4, the size of step_ex is size(n_ex)-1 and for the given example, it is step_ex = (1,2,1)

  • % n_ex(:) :: integer — Array containing the allowed excitation numbers, e.g. (0,1,2,3,4) in case of four spins (without any restriction). With n_ex_min=1, n_ex_max=3 and step width of 1 the above example becomes (1,2,3)

  • % left(:) :: integer — Array containing the leftmost positions in the ind array, where spin configurations corresponding to a given total spin excitation start. This array has therefore the same size as n_ex. In the above description, the entries are \(1, N_1+1, N_2+1, ..., N_k+1\)

  • % right(:) :: integer — Identical to left but with the positions of the rightmost spin configuration in ind correspoding to a given total spin excitation. In the above description, the entries are \(N_1, N_2, ..., N\)

  • % dimindex(:) :: integer — Array containing the sizes of the the reduced Hilbert spaces corresponding to different allowed total excitation numbers. E.g., for four spins, the dimension of the Hilbert space defined by all possible spin configurations with 0 total excitations is 1, with 1 total excitation is 4, etc.

type  qdyn_def_mod/spin_op_t[source]

Variable containing all the information about a single spin operator.

The operator can be a local or a spin-spin interaction operator. Possible operators are restricted to one and two body couplings. Any spin operator \(\op{O}\) must be one of the following:

\[\op{O} \in \left\{\op{\sigma}_{x}^{(i)}, \op{\sigma}_{y}^{(i)}, \op{\sigma}_{z}^{(i)}, \op{\sigma}_{x}^{(i)} \op{\sigma}_{x}^{(j)}, \op{\sigma}_{y}^{(i)} \op{\sigma}_{y}^{(j)}, \op{\sigma}_{z}^{(i)} \op{\sigma}_{z}^{(j)} \right\}\]
Type fields
  • % spinop :: character(len=spinop_l) — String, determining the type of the operator (local or spin-spin interaction operator). Valid strings for local spin operators are 'loc_x', 'loc_y' and 'loc_z', which represent local \(\sigma_{x}^{(i)}\), \(\sigma_{y}^{(i)}\) and \(\sigma_{z}^{(i)}\), respectively. The site \(i\), i.e., the spin on which the local operator act, is defined by site_i. Valid strings for spin-spin interaction operators are 'int_X', 'int_Y', 'int_Z', which apply \(\sigma_{x}^{(i)} \sigma_{x}^{(j)}\), \(\sigma_{y}^{(i)} \sigma_{y}^{(j)}\) and \(\sigma_{z}^{(i)} \sigma_{z}^{(j)}\), respectively. All of the above operators (local or interacting) are scaled by the value alpha. Furthermore, for spin-spin interaction and the sake of numerical efficiency, the strings 'int_XX' and 'int_XY' are valid. The first one effectively implements 'int_X'`+’int_Y’` (both with identical scaling from alpha), the second one effectively implements 'int_X'`+’int_Y’` (both with different prefactors, i.e., 'int_X' is scaled with the value from alpha and 'int_Y' is scaled with the value from beta)

  • % site_i :: integer — (Primary) site, i.e., spin, on which the operator defined in spinop operates

  • % site_j :: integer — (Secondary) site, i.e., spin, on which the operators defined in spinop operates. Its value must only be non-vanishing, if the respective operator in spinop describes a spin-spin interaction operator. For local operators, this array is of no relevance and the value is set to zero

  • % alpha :: complex(idp) — (Primary) scaling coefficient for the operator in spinop. Each operator (except 'int_XY') is scaled by this value

  • % beta :: complex(idp) — (Secondary) scaling coefficient for the operator in spinop. It is only relevant (and must have a non-vanishing entry) for an operator of type 'int_XY'. It defines the scaling coefficients for the \(\op{\sigma}_{y}^{(i)} \op{\sigma}_{y}^{(j)}\) part of the operator, while the scaling for the \(\op{\sigma}_{x}^{(i)} \op{\sigma}_{x}^{(j)}\) part is taken from alpha

  • % pcoup :: pulse_coupling_t — Data structure containing all information regarding the coupling of a pulse to the operator

type  qdyn_def_mod/spline_t[source]

Data structure for splining data.

Type fields
  • % n :: integer — Number of \((x,f(x))\) pairs of the spline

  • % cm(:) :: real(idp) — Array of interpolation help coefficients

  • % x(:) :: real(idp) — Array of x axis values

  • % y(:) :: real(idp) — Array of corresponding y axis values

type  qdyn_def_mod/state_t[source]

Numerical representation of a state (wave function or density matrix).

Type fields
  • % psi(:,:,:,:,:) :: complex(idp) — Wave function amplitude; psi(x1, x2, x3, spin, surface)

  • % rho(:,:,:,:,:,:) :: complex(idp) — Density matrix amplitude; rho(x, spin, surface, x',spin', surface')

  • % coord_min(:) :: real(idp) — Minimum coordinate (per dimension) for moving grid

  • % mom_disp(:) :: real(idp) — Momentum displacement (for moving momentum grids)

  • % movgrid_nr(:) :: integer — Number of stored amplitudes in each dimension. This is equal to the number of grid points in that dimension, unless a moving grid is used, in which case movgrid_nr describes the spatial extension of the wave function

  • % surfs :: integer — Number of surfaces

  • % spindim :: integer — Number of spin configurations

type  qdyn_def_mod/target_storage_t[source]

Storage used in the optimization of a OCT target.

Type fields
  • % fw(:) :: prop_seg_storage_t — Storage for one or more forward propagations (e.g. propagation under the old and under the new field)

  • % bw(:) :: prop_seg_storage_t — Storage for one or more backward propagations.

  • % fw_mark :: integer — Marker that can be used to make fw into a cyclic array. For example, fw_mark could always be set to point to the element in fw that contains the states from the previous optimization.

  • % basis_state :: state_t — Functionals based on local invariants need to take into acount the logical (non-Bell) basis

  • % bell_proj :: state_t — Storage for a temporary state that is required when constructing the backward-propagated state in a Krotov optimization with a local-invariants based functional

type  qdyn_def_mod/tgrid_pt[source]

Config file information of the global time grid.

Type fields
  • % t_start :: real(idp) — Starting point of time grid

  • % t_stop :: real(idp) — End point of time grid

  • % dt :: real(idp) — Time step

  • % nt :: integer — Number of points

  • % fixed :: logical — True if the time grid shall not be changed during pulse initialisation

type  qdyn_def_mod/user_pt[source]

User defined config data (in dictionary format).

Type fields
  • % reals_keys(100) :: character(len=para_user_l) — Names for real values

  • % reals_vals(100) :: real(idp) — Real values

  • % ints_keys(100) :: character(len=para_user_l) — Names for integer values

  • % ints_vals(100) :: integer — Integer values

  • % logicals_keys(100) :: character(len=para_user_l) — Names for logical values

  • % logicals_vals(100) :: logical — Logical values

  • % strings_keys(100) :: character(len=para_user_l) — Names for string values

  • % strings_vals(100) :: character(len=datline_l) — String values

  • % reals_i :: integer — Number of used real values

  • % ints_i :: integer — Number of used integer values

  • % logicals_i :: integer — Number of used logical values

  • % strings_i :: integer — Number of used string values

type  qdyn_def_mod/vmi_image_t[source]

Stores image data for a single velocity map image.

This is a submember of the complete velocity map image datastructure vmi_t.

Type fields
  • % vmi_image(:,:) :: real(idp) — Values of the velocity map image at the different coordinate grid points specified in x1_coord and x2_coord.

  • % x1_coord(:) :: real(idp) — Grid points in x1 direction on which the image values are calculated

  • % x2_coord(:) :: real(idp) — Grid points in x2 direction on which the image values are calculated

type  qdyn_def_mod/vmi_info_t[source]

Stores information about a single velocity map image.

This is a submember of the complete velocity map image datastructure vmi_t. The image data is stored in the corresponding vmi_image_t.

Type fields
  • % val_angle :: real(idp) — Angle about which the function had been rotated before the projection was performed to calculate the velocity map image.

  • % x1max :: real(idp) — Maximal value of the spatial coordinates in x1 direction.

  • % x2max :: real(idp) — Maximal value of the spatial coordinates in x2 direction.

  • % dx1 :: real(idp) — Stepsize used to define the spatial grid of the image in x1 direction.

  • % dx2 :: real(idp) — Stepsize used to define the spatial grid of the image in x2 direction.

  • % nx1 :: integer — Number of grid points that are used to represent the image in the x1 direction (Number of pixels).

  • % nx2 :: integer — Number of grid points that are used to represent the image in the x2 direction (Number of pixels).

  • % rmax :: real(idp) — Upper bound of the integration which is performed to project the wavefunction.

  • % pplane_size :: real(idp) — Size of the plane onto which the function will be projected. This defines the size of the velocity map image in the x1 and x2 direction for the cartesian case and in R direction for the polar case.

  • % coord_type :: character(len=25) — Type of coordinates in which the velocity map image is represented (Can bei either cartesian or polar).

  • % rotax :: character(len=1) — Axes about which the wavefunction has been rotated before projection. Can take the values x, y or z.

  • % inverted :: logical — If set to true indicates, that the corresponding projected image has been inverted (2D Projection -> 3D Inversion).

  • % inversion_type :: character(len=25) — Type of inversion algorithm that has been used to invert the image (Currently only the pBasex algorithm has been implemented).

  • % nradial :: integer — In case of a pBasex inversion, the number of radial gauss functions used to represent the projected wavefunction.

  • % nangular :: integer — In case of a pBasex inversion, the number of used legendre polynomials used to represent the angular part of the projected wavefunction.

type  qdyn_def_mod/vmi_t[source]

Collection of velocity map images.

Multiple velocity map image submembers stored in the array angle and the corresponding information for every submember stored in the array info.

Type fields
  • % angle(:) :: vmi_image_t — Collection of the different velocity map image submembers.

  • % info(:) :: vmi_info_t — Collection of the informations on the different submembers.

type  qdyn_def_mod/work_cardinalbase_t[source]

Collection of work arrays for application of the kinetic operator in the cardinal basis.

Type fields
  • % Tkin_cardinal(:,:) :: complex(idp) — When using cardinal grid, stores the kinetic matrix representation of the global grid required for time propagation in banded storage format.

  • % Pmom_cardinal(:,:) :: complex(idp) — When using cardinal grid, stores the momentum matrix representation of the global grid in banded storage format.

  • % nl :: integer — When using cardinal grid, \(nl + 1\) is the number of grid points in each element

  • % m :: integer — When using cardinal grid, \(m\) is the number of

  • % psi(:,:,:,:,:) :: complex(idp) — Temporary state array, required for momentum operator application

type  qdyn_def_mod/work_channels_t[source]

Collection of internal data for setting up scattering channels.

Type fields
  • % coup_V(:,:,:) :: real(idp) — [Missing Documentation]

  • % l2(:,:) :: real(idp) — Matrix of angular momentum

  • % coup_d(:,:) :: real(idp) — Matrix of couplings by static electric field

  • % coup_al0(:,:) :: real(idp) — Matrix of couplings by isotropic part of polarizability

  • % coup_dal(:,:) :: real(idp) — Matrix of couplings by anisotropic part of polarizability

  • % coup_Zeeman(:,:) :: real(idp) — Zeeman Hamiltonian

  • % coup_i1s1(:,:) :: real(idp) — Matrix of couplings by hyperfine interaction on 1st atom

  • % coup_i2s2(:,:) :: real(idp) — Matrix of couplings by hyperfine interaction on 2st atom

  • % coup_i2s1(:,:) :: real(idp) — Matrix of couplings by hyperfine interaction between electron spin on 1st atom and nuclear spins on 2nd atom

  • % coup_s1s2(:,:) :: real(idp) — Matrix of couplings by spin-spin interaction

  • % coup_sl(:,:) :: real(idp) — Matrix of couplings by spin-rotation interaction

  • % coup_so(:,:) :: real(idp) — Matrix of couplings by spin-orbit interaction

  • % U(:,:) :: real(idp) — Unitary transformation from diagonal in hyperfine interaction basis to product state basis. See the routines in the qdyn_numerov_mod module for details

  • % ndip :: integer — Number of operators with atype=='dip' in the Hamiltonian

  • % nso :: integer — Number of operators with atype=='so' in the Hamiltonian

  • % nsurf :: integer — Number of potential energy surfaces in the Hamiltonian, i.e. equals ham%nsurf

  • % i_entrance :: integer — Index of entrance channel in the list of channels. If para%is_set%scattering%entrance_channel is .true. this will take the value of scattering%entrance_channel.

  • % al0(:) :: integer — For each surface stores the index of the operator that contains a part of the polarizability in list of operators of the Hamiltonian

  • % dal(:) :: integer — For each surface stores the index of the operator that contains a part of the polarizability in list of operators of the Hamiltonian

  • % d(:) :: integer — For each surface stores the index of the operator that contains the permanent dipole moment in list of operators of the Hamiltonian

type  qdyn_def_mod/work_cheby_t[source]

Collection of internal data for Chebychev propagation.

Type fields
  • % phi0 :: state_t — Temporary wave function 1

  • % phi1 :: state_t — Temporary wave function 2

  • % phi2 :: state_t — Temporary wave fucntion 3

  • % J2_mat(:,:) :: real(idp)\(J^2\)-part of the rotational kinetic operator (to be multiplied with \(B_\rot\))

  • % B_rot(:) :: real(idp) — Rotational constant \(B_\rot\)

  • % inv_sq_weights(:) :: real(idp) — Inverse of the square root of the DVR-weights

  • % de :: real(idp) — Spectral radius for which the Cheby coeffs were calculated

  • % a(:) :: real(idp) — Array of real Chebychev coefficients (for homog. prop)

  • % winhom :: work_inhom_t — Work datastructure for inhomogeneous propagation

type  qdyn_def_mod/work_dvr_legendre_t[source]

Internal data for applying the kinetic operator for rotational degrees of freedom.

Type fields
  • % J2_mat(:,:) :: real(idp) — J^2 part of the rotational kinetic operator (to be multiplied with B_rot)

  • % B_rot(:) :: real(idp) — Rotational constant

type  qdyn_def_mod/work_exact_t[source]

Collection of internal data for exact propagation (i.e. via diagonalization).

Type fields
  • % L(:,:) :: complex(idp) — Storage space for full Liouvillian matrix

  • % H(:,:) :: complex(idp) — Storage space for full Hamiltonian matrix

  • % eigenvals(:) :: complex(idp) — Storage for eigenvalues of L

  • % state_in(:) :: complex(idp) — Copy of input state

type  qdyn_def_mod/work_expbase_t[source]

Collection of work arrays for application of the kinetic operator in the exponential basis.

Type fields
  • % fft_coeff(:,:) :: real(idp) — Array of FFT coefficients

  • % one_over_J(:) :: real(idp) — Array of inverse Jacobian

  • % one_over_sqrt_J(:) :: real(idp) — Array of inverse Jacobian, square root

type  qdyn_def_mod/work_inhom_t[source]

Collection of internal data for inhomogeneous propagation.

Type fields
  • % inhom_order(:,:) :: inhom_cheby_coeffs_t — Array of Chebychev coefficient arrays. inhom_order(m)%c contains the coefficients for the expansion of \(F_m\) for the \(m\)’th order expansion of the inhomogeneous term

  • % phi_j(:) :: state_t — Storage space for expansion terms of the inhomgeneity, must be allocated to size inhom_max_order

  • % tau_grid(:) :: real(idp) — Local time grid in expansion of inhomogeneous term, must be allocated to size inhom_max_order

  • % phi_fft_scratch(:) :: complex(idp) — FFT scratch space for expansion of the inhomogeneity

  • % phi_cn(:) :: complex(idp) — In interpolation in inhomog. prop., function, array of cheby coeffs (plus scratch space for costransf)

  • % phi_pn(:) :: complex(idp) — In interpolation in inhomog. prop., function, array of power series coeffs

  • % monic_C(:,:) :: complex(idp) — Scratch space for \(C\)-matrix used in monic transform

  • % n_taylor :: integer — Copy of para%prop%n_taylor

type  qdyn_def_mod/work_momentum_ops_t[source]

Collection of work arrays for the application of momentum space operators.

Type fields
  • % psi_mom(:,:,:,:,:,:) :: complex(idp) — Copies of the amplitudes of the psi variable in H_psi, in momentum space, per thread. The first five dimensions are those of that psi component of a state, the last dimension numbers the threads (zero-based index).

type  qdyn_def_mod/work_movgrid_t[source]

Scratch space for propagating with a moving basis.

Type fields
  • % state_temp :: state_t — Temporary state used for expectation values

type  qdyn_def_mod/work_newton_t[source]

Collection of internal data for Newton propagation.

Type fields
  • % v :: state_t — For restarted Newton, initial vector at each restart

  • % arnoldi_vecs(:) :: state_t — Array of arnoldi vectors. Will be allocated to contain \(m+1\) vectors, where \(m\) is given by newton_arnoldi_order in the config file

  • % phi0 :: state_t — Temporary wave function 1

  • % phi1 :: state_t — Temporary wave function 2

  • % winhom :: work_inhom_t — Work datastructure for inhomogeneous propagation

type  qdyn_def_mod/work_nito_t[source]

Work data for newITO (new version, currently only Newton).

Type fields
  • % mean_it :: real(idp) — Mean number of iterations needed for the given set of parameters

  • % rel_errors(:) :: real(idp) — Contains the calculated relative errors of every time step

  • % first_error(4) :: integer — First occurance of a calculated error which lead to a warning: 1. fi_error = Error of time expansion of the inhomogeneity (increase M) 2. fm_fHl_error = Error of the fHlambda matrix resulting from the calculation of f(H) 3. fm_state_error = Error of the calculated state resulting from the calculation of f(H) 4. Maximal number of iterations reached (probably no convergence)

  • % max_error(4) :: real(idp) — Maximal errors resulting from the four cases above

  • % n_warnings(4) :: integer — Number of warnings resulting from the four cases above

  • % t_mid_i :: integer — Index of the middle point in the local time grid. t_mid_i = (M+1)/2

  • % t_test :: real(idp) — Test point in local time grid, for test of accuracy of the inhomogeneous expansion

  • % lambda_nrm :: real(idp) — Temporary saved norm of the lambda_M vector

  • % n2t_coeffs(:,:) :: real(idp) — Matrix of transformation coefficients to transform newton coeffs to taylor coeffs

  • % t_2ts(:) :: real(idp) — Local time grid of current and next step (and test points)

  • % time(:) :: real(idp) — Absolute times of local time grid

  • % timeMat_current(:,:) :: real(idp) — Matrix of time monomials for current time grid

  • % timeMat_next(:,:) :: real(idp) — Matrix of time monomials for next time grid

  • % Hess(:,:) :: complex(idp) — Hessenberg matrix from Arnoldi iteration

  • % Ritz(:) :: complex(idp) — Ritz values from Arnoldi iteration

  • % fm_vecs(:,:) :: complex(idp) — Expansion vectors for calculation of the function F_m

  • % dvdf(:,:) :: complex(idp) — Divided differences for Newton interpolation

  • % samplingp(:) :: complex(idp) — Sampling points for Newton interpolation

  • % fm_fz(:,:) :: complex(idp) — Matrix of function values \(F_m(z,t)\) for different points \(z\) and times \(t\)

  • % fHlamb_kr(:,:) :: complex(idp) — Matrix representing the solution of f(H)*lambda in the Krylov space

  • % state_guess(:) :: state_t — Guess states for next or from last time step

  • % state_last(:) :: state_t — Solution state from last iteration

  • % state_new(:) :: state_t — New solution state

  • % lambda(:) :: state_t — Recursive calculated lambda states for the solution of the inhomogeneous Schroedinger equation

  • % fi(:) :: state_t — Inhomogeneous states given by V(t)|state_last>

  • % newton_coeffs(:) :: state_t — Coefficients for the Newton interpolation polynomial

  • % Vmat(:) :: state_t — V matrix with Arnoldi vectors

  • % taylor_coeffs(:) :: state_t — Coefficients for a Taylor-like interpolation polynomial

  • % fi_test :: state_t — Test state for the accuracy of the inhomogeneous expansion

  • % fi_Vt :: state_t — Temporary state, V(t)|state_last>

  • % fi_Hn :: state_t — Temporary state, V(t_mid)|state_last>

  • % fi_s :: state_t — Temporary state, time-dependent inhomogeneity in the inhomogeneous Schroedinger equation

  • % G_lambda :: state_t — Temporary state for recursive calculation of the lambda vectors, G|lambda>

  • % i_target :: integer — Index of target this work space belongs to

  • % n_targets :: integer — Total number of targets for Krotov optimization

  • % chi_tau :: prop_seg_storage_t — If initialized for Krotov, stored backward propagated co-states in the intermediate points of the local time grids

  • % tau_pulses(:,:) :: pulse_t — Pulses at the intermediate tau points in the local time grid of ITO, calculated with the Krotov algorithm

  • % ref_pulses(:) :: pulse_t — Tempoararily stored reference pulses for the computation of the update

  • % cn(:) :: complex(idp) — Coefficients for the Clenshaw-Curtis quadrature

  • % fft_scratch(:) :: complex(idp) — Scratch space for the FFT

type  qdyn_def_mod/work_numerov_t[source]

Collection of internal data and work arrays for Numerov method.

Type fields
  • % R_init(:,:) :: real(idp) — Initial \(R\)-matrix

  • % R_asym(:,:) :: real(idp) — Asymptotic \(R\)-matrix, evaluated at grid_r_asym

  • % i_asym :: integer — Index of the grid point at which the asymptotic \(R\) matrix is defined

  • % grid_r_asym :: real(idp) — Value of the grid point at which the asymptotic \(R\) matrix is defined

  • % dr_asym :: real(idp) — Asymptotic stepsize, defined as \(r_{i_{mathrm{asym}}+1} - r_{i_{mathrm{asym}}}\)

type  qdyn_def_mod/work_rk45_t[source]

Collection of internal data for Runge-Kutta-Propagation.

See documentation in rk45().

Type fields
  • % iflag :: integer — Integer flag (status)

  • % relerr :: real(idp) — Allowed relative error

  • % abserr :: real(idp) — Allowed absolute error

  • % yp :: state_t — [ Missing Documentation ]

  • % f1 :: state_t — [ Missing Documentation ]

  • % f2 :: state_t — [ Missing Documentation ]

  • % f3 :: state_t — [ Missing Documentation ]

  • % f4 :: state_t — [ Missing Documentation ]

  • % f5 :: state_t — [ Missing Documentation ]

  • % h :: real(idp) — [ Missing Documentation ]

  • % nfe :: integer — [ Missing Documentation ]

  • % k :: integer — [ Missing Documentation ]

  • % mflag :: integer — [ Missing Documentation ]

  • % kop :: integer — [ Missing Documentation ]

  • % init :: integer — [ Missing Documentation ]

  • % jflag :: integer — [ Missing Documentation ]

  • % kflag :: integer — [ Missing Documentation ]

  • % pflag :: integer — [ Missing Documentation ]

  • % ae :: real(idp) — [ Missing Documentation ]

  • % dt :: real(idp) — [ Missing Documentation ]

  • % ee :: real(idp) — [ Missing Documentation ]

  • % eeoet :: real(idp) — [ Missing Documentation ]

  • % esttol :: real(idp) — [ Missing Documentation ]

  • % et :: real(idp) — [ Missing Documentation ]

  • % hmin :: real(idp) — [ Missing Documentation ]

  • % rer :: real(idp) — [ Missing Documentation ]

  • % s :: real(idp) — [ Missing Documentation ]

  • % scale :: real(idp) — [ Missing Documentation ]

  • % tol :: real(idp) — [ Missing Documentation ]

  • % toln :: real(idp) — [ Missing Documentation ]

  • % ypk :: real(idp) — [ Missing Documentation ]

  • % savre :: real(idp) — [ Missing Documentation ]

  • % savae :: real(idp) — [ Missing Documentation ]

  • % ch :: real(idp) — [ Missing Documentation ]

  • % hfaild :: logical — [ Missing Documentation ]

  • % output :: logical — [ Missing Documentation ]

  • % alt_pulses(:) :: pulse_t — [ Missing Documentation ]

  • % pulse_rsplines(:) :: spline_t — [ Missing Documentation ]

  • % pulse_isplines(:) :: spline_t — [ Missing Documentation ]

  • % phi_rsplines(:,:,:,:,:) :: spline_t — [ Missing Documentation ]

  • % phi_isplines(:,:,:,:,:) :: spline_t — [ Missing Documentation ]

  • % phi_cache(0:4) :: state_t — [ Missing Documentation ]

  • % cache_c :: integer — [ Missing Documentation ]

  • % cache_l :: integer — [ Missing Documentation ]

  • % cache_r :: integer — [ Missing Documentation ]

  • % last_pulse_val_i :: integer — [ Missing Documentation ]

type  qdyn_def_mod/work_sinbase_t[source]

Collection of work arrays for application of the kinetic operator in the sin/cos basis.

Type fields
  • % one_over_J(:) :: real(idp) — Array of inverse Jacobian

  • % one_over_sqrt_J(:) :: real(idp) — Array of inverse Jacobian, square root

  • % phis(:,:) :: real(idp) — Temporary wave function in sin expansion

  • % phic(:,:) :: real(idp) — Temporary wave function in cos expansion

  • % sin_wsave(:,:) :: real(idp) — Internal work array for sin transformation

  • % cos_wsave(:,:) :: real(idp) — Internal work array for cos transformation

subroutine  qdyn_def_mod/G0(state_out, state_in, gen, grid, pulses, para, pulse_val_i)[source]

Function returning \(\op{G_0} \cdot\) state, where \(G_0\) is the time-independent part of the dynamical generator.

Parameters
  • state_out :: state_t, inout — Returned output state Input state Dynamical generator Spatial grid Array of pulses Parameter set Pulse time index

  • state_in :: state_t, in

Options
subroutine  qdyn_def_mod/Ginhom(state_out, state_in, t, para)[source]

Function returning \(s(t)\), where s is the time-dependent inhomogeneity of the dynamical generator.

Parameters
  • state_out :: state_t, inout — Returned output state Input state (Absolute) time Parameter set

  • state_in :: state_t, in

  • t :: real(kind=idp), in

Options

para :: para_t, in

subroutine  qdyn_def_mod/Gt(state_out, state_in, t, gen, grid, pulses, para, pulse_val_i)[source]

Function returning \(\op{V_t} \cdot\) state, where \(V_t\) is the time-dependent part of the dynamical generator.

Parameters
  • state_out :: state_t, inout — Returned output state Input state (Absolute) time Dynamical generator Spatial grid Array of pulses Parameter set Pulse time index

  • state_in :: state_t, in

  • t :: real(kind=idp), in

Options
subroutine  qdyn_def_mod/clone_op_matrix_t_safe(var_cloned, var_orig)[source]

Debug a variable of type op_matrix_t safely, by setting checked=.false.

Parameters
  • var_cloned :: op_matrix_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: op_matrix_t, in — Variable to be cloned

subroutine  qdyn_def_mod/debug_carray(array, n, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of the given array.

Parameters
  • array :: complex(idp), in — Array of reals, passed variable may be of any rank

  • n :: complex(idp), in — size(array)

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in array

  • array_name :: character, in — Name of the array variable

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/debug_derived_array(typename, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of an array of derived type with the given specifications.

Parameters
  • typename :: character, in — Name of the type of the array

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in the array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in the array

  • array_name :: character, in — Name of the array

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/debug_iarray(array, n, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of the given array.

Parameters
  • array :: integer, in — Array of integers, passed variable may be of any rank

  • n :: integer, in — size(array)

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in array

  • array_name :: character, in — Name of the array variable

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/debug_ilng_array(array, n, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of the given array.

Parameters
  • array :: integer(ilng), in — Array of integers, passed variable may be of any rank

  • n :: integer(ilng), in — size(array)

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in array

  • array_name :: character, in — Name of the array variable

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/debug_larray(array, n, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of the given array.

Parameters
  • array :: logical, in — Array of reals, passed variable may be of any rank

  • n :: logical, in — size(array)

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in array

  • array_name :: character, in — Name of the array variable

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/debug_rarray(array, n, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of the given array.

Parameters
  • array :: real(idp), in — Array of reals, passed variable may be of any rank

  • n :: real(idp), in — size(array)

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in array

  • array_name :: character, in — Name of the array variable

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/debug_sarray(array, n, lbounds, ubounds, array_name, indent, out_unit)[source]

Print a one-line debug representation of the given array.

Parameters
  • array :: character, in — Array of reals, passed variable may be of any rank

  • n :: character, in — size(array)

  • lbounds(:) :: integer, in — List of lower bounds, per dimension in array

  • ubounds(:) :: integer, in — List of upper bounds, per dimension in array

  • array_name :: character, in — Name of the array variable

Options
  • indent :: integer, in — If given, number of spaces by which to indent

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT

subroutine  qdyn_def_mod/dump_ascii_carray(array, n, out_unit)[source]

Write a dump of the given array to the given out_unit.

Parameters
  • array :: complex(idp), in — Array of complex numbers, passed variable may be of any rank

  • n :: complex(idp), in — size(array)

  • out_unit :: integer, in — Write output to the given (open) file unit,

subroutine  qdyn_def_mod/dump_ascii_iarray(array, n, out_unit)[source]

Write a dump of the given array to the given out_unit.

Parameters
  • array :: integer, in — Array of integers, passed variable may be of any rank

  • n :: integer, in — size(array)

  • out_unit :: integer, in — Write output to the given (open) file unit,

subroutine  qdyn_def_mod/dump_ascii_ilng_array(array, n, out_unit)[source]

Write a dump of the given array to the given out_unit.

Parameters
  • array :: integer(ilng), in — Array of integers (ilng precision), passed variable may be of any rank

  • n :: integer(ilng), in — size(array)

  • out_unit :: integer, in — Write output to the given (open) file unit,

subroutine  qdyn_def_mod/dump_ascii_larray(array, n, out_unit)[source]

Write a dump of the given array to the given out_unit.

Parameters
  • array :: logical, in — Array of logicals, passed variable may be of any rank

  • n :: logical, in — size(array)

  • out_unit :: integer, in — Write output to the given (open) file unit,

subroutine  qdyn_def_mod/dump_ascii_rarray(array, n, out_unit)[source]

Write a dump of the given array to the given out_unit.

Parameters
  • array :: real(idp), in — Array of reals, passed variable may be of any rank

  • n :: real(idp), in — size(array)

  • out_unit :: integer, in — Write output to the given (open) file unit,

subroutine  qdyn_def_mod/dump_ascii_sarray(array, n, out_unit)[source]

Write a dump of the given array to the given out_unit.

Parameters
  • array :: character, in — Array of strings, passed variable may be of any rank

  • n :: character, in — size(array)

  • out_unit :: integer, in — Write output to the given (open) file unit,

function  qdyn_def_mod/f_dep_func(f_dep_func, pulses, pulse_val_i, der_selector, this)[source]

Function interface describing the analytical functional dependency of an operator to a set of pulses.

Parameters
  • f_dep_func :: complex(idp), (out) — function result

  • pulses(:) :: pulse_t, in — Array of pulses; note that the function might depend only on some of the pulses

  • pulse_val_i :: integer, in — Time index for which to evaluate the pulse values

  • der_selector :: integer, in — Integer indicating what the function should return. If der_selector=0, returns the functional value for the passed pulse values in cpulses. If 1<=der_selector<=n_var, returns the first derivative with respect to pulse der_selector (only necessary for usage in OCT). Note that the used function must be programmed accordingly, as QDYN cannot check its return value

Options

this :: class(pulse_coupling_t), in — pulse_coupling_t object from which f_dep_func is called

function  qdyn_def_mod/pulse_func(pulse_func, t, para, this)[source]

Function for analytical description of the pulse.

Returns the (complex) amplitude, e.g. amplitude = pulse_func(t, para).

Parameters
  • pulse_func :: complex(idp), (out) — function result

  • t :: real(idp), in — (Absolute) time

Options
  • para :: para_t, in — Parameter set

  • this :: class(pulse_t), in — Pulse object from which pulse_func is called. Usually passed automatically.

subroutine  qdyn_def_mod/read_dumped_ascii_carray(array, n, in_unit)[source]

Read in an ascii-dump of the given array, from the given in_unit.

Parameters
  • array :: complex(idp), inout — Array of complex numbers, passed variable may be of any rank

  • n :: complex(idp), inout — size(array)

  • in_unit :: integer, in — Read input from the given (open) file unit,

subroutine  qdyn_def_mod/read_dumped_ascii_iarray(array, n, in_unit)[source]

Read in an ascii-dump of the given array, from the given in_unit.

Parameters
  • array :: integer, inout — Array of integers, passed variable may be of any rank

  • n :: integer, inout — size(array)

  • in_unit :: integer, in — Read input from the given (open) file unit,

subroutine  qdyn_def_mod/read_dumped_ascii_ilng_array(array, n, in_unit)[source]

Read in an ascii-dump of the given array, from the given in_unit.

Parameters
  • array :: integer(ilng), inout — Array of integers (ilng precision), passed variable may be of any rank

  • n :: integer(ilng), inout — size(array)

  • in_unit :: integer, in — Read input from the given (open) file unit,

subroutine  qdyn_def_mod/read_dumped_ascii_larray(array, n, in_unit)[source]

Read in an ascii-dump of the given array, from the given in_unit.

Parameters
  • array :: logical, inout — Array of logicals, passed variable may be of any rank

  • n :: logical, inout — size(array)

  • in_unit :: integer, in — Read input from the given (open) file unit,

subroutine  qdyn_def_mod/read_dumped_ascii_rarray(array, n, in_unit)[source]

Read in an ascii-dump of the given array, from the given in_unit.

Parameters
  • array :: real(idp), inout — Array of reals, passed variable may be of any rank

  • n :: real(idp), inout — size(array)

  • in_unit :: integer, in — Read input from the given (open) file unit,

subroutine  qdyn_def_mod/read_dumped_ascii_sarray(array, n, in_unit)[source]

Read in an ascii-dump of the given array, from the given in_unit.

Parameters
  • array :: character, inout — Array of strings, passed variable may be of any rank

  • n :: character, inout — size(array)

  • in_unit :: integer, in — Read input from the given (open) file unit,

subroutine  qdyn_def_mod/assignment(...)
Interface Implementations

subroutine  qdyn_def_mod/clone_tgrid_pt(var_cloned, var_orig)[source]

Create a deep copy of a variable of type tgrid_pt.

Parameters
  • var_cloned :: tgrid_pt, inout — Variable that will be created as a copy of var_orig

  • var_orig :: tgrid_pt, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_grid_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type grid_t.

Parameters
  • var_cloned :: grid_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: grid_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_pulse_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type pulse_t.

Parameters
  • var_cloned :: pulse_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: pulse_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_grid_op_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type grid_op_t.

Parameters
  • var_cloned :: grid_op_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: grid_op_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_op_matrix_t_safe(var_cloned, var_orig)[source]

Debug a variable of type op_matrix_t safely, by setting checked=.false.

Parameters
  • var_cloned :: op_matrix_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: op_matrix_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_ham_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type ham_t.

Parameters
  • var_cloned :: ham_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: ham_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_dyn_generator_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type dyn_generator_t.

Parameters
  • var_cloned :: dyn_generator_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: dyn_generator_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_state_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type state_t.

Parameters
  • var_cloned :: state_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: state_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_eigensystem_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type eigensystem_t.

Parameters
  • var_cloned :: eigensystem_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: eigensystem_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_oct_target_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type oct_target_t.

Parameters
  • var_cloned :: oct_target_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: oct_target_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_oct_info_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type oct_info_t.

Parameters
  • var_cloned :: oct_info_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: oct_info_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone_para_t(var_cloned, var_orig)[source]

Create a deep copy of a variable of type para_t.

Parameters
  • var_cloned :: para_t, inout — Variable that will be created as a copy of var_orig

  • var_orig :: para_t, in — Variable to be cloned

subroutine  qdyn_def_mod/clone(...)

Clone a QDYN-type variable.

The routines combined in this interface create a deep copy of a variable of the corresponding type. It is used as follows:

call clone(var_cloned, var_orig)

Both arguments must be of the same type (any type defined in qdyn_def_mod)

The clone() is used as an implementation for the assignment operator (e.g. pulse2 = pulse1) for some but not all types.

Parameters
  • var_cloned :: inout — Variable that will be created as a copy of var_orig

  • var_orig :: in — Variable to be cloned

subroutine  qdyn_def_mod/debug(...)

Debug a QDYN-type variable.

The routines combined in this interface print information on a variable of the corresponding type. It is used as follows:

call debug(var, var_name, is_target, expand, indent, &
&          filename, append, out_unit)
Parameters
  • var :: in — Variable to print debug representation of. The type of var can be any of the ones defined in qdyn_def_mod.

  • var_name :: character, in — Name of variable to debug

Options
  • is_target :: logical, in — If given as .true., var is printed as the target of a pointer

  • expand :: integer, in — If given with a value greater than 0, expand up to expand levels for components that are 1D arrays of a derived type

  • indent :: integer, in — Number of spaces of indentation

  • filename :: character, in — If present, write output to the given file instead of STDOUT

  • append :: logical, in — When writing to file, append.

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of STDOUT. Do not combine with filename

subroutine  qdyn_def_mod/delete(...)

Delete a QDYN-type variable.

The routines combined in this interface delete a variable of the corresponding type. It is used as follows:

call delete(var, thorough)
Parameters

var :: inout — The variable to delete. The type of var can be any of the ones defined in qdyn_def_mod.

Options

thorough :: logical, in — If given as .true. recursively zero out all components of var. All numbers will be set to zero, logicals to .false., and strings to the empty string.

subroutine  qdyn_def_mod/dump(...)

Dump a QDYN-type variable to a binary file.

The routines combined in this interface write the content of a variable with the corresponding type to a file. It is used as follows:

call dump(var, filename, out_unit)

Either filename or out_unit must be given, but not both.

Parameters

var :: in — Variable to dump to file. The type of var can be any of the ones defined in qdyn_def_mod.

Options
  • filename :: character, in — If present, name of output file

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of filename.

subroutine  qdyn_def_mod/dump_array(...)

Dump an array of QDYN-type variables to a open binary file.

The routines combined in this interface write the content of an array of QDYN-type variables to binary open unformatted file unit. It is used as follows:

call dump_array(array, n, out_unit)
Parameters
  • n :: in — size(array)

  • array :: in — Array to dump. The type of array can be any of the ones defined in qdyn_def_mod, and it may have any rank and shape.

  • out_unit :: integer, in — Unformatted open file unit to which to write data

subroutine  qdyn_def_mod/dump_ascii(...)

Dump a QDYN-type variable to an ASCII file.

The routines combined in this interface write the content of a variable of the corresponding type to a file. It is used as follows:

call dump_ascii(var, filename, out_unit)

Either filename or out_unit must be given, but not both.

Parameters

var :: in — Variable to print to file. The type of var can be any of the ones defined in qdyn_def_mod.

Options
  • filename :: character, in — If present, name of output file

  • out_unit :: integer, in — If present, write output to the given (open) file unit, instead of filename.

subroutine  qdyn_def_mod/dump_ascii_array(...)

Dump an array of QDYN-type variables to an open ASCII file.

The routines combined in this interface write the content of a variable array of the corresponding type an open text file handle. It is used as follows:

call dump_ascii_array(array, n, out_unit)
Parameters
  • n :: in — size(array)

  • array :: in — Array to dump. The type of array can be any of the ones defined in qdyn_def_mod, and it may have any rank and shape.

  • out_unit :: integer, in — Write output to the given open file unit.

subroutine  qdyn_def_mod/read_dumped(...)

Read a QDYN-type variable from a dumped binary file.

The routines combined in this interface read a dumped binary file (as generated by dump()) in to a variable. It is used as follows:

call read_dumped(var, filename, in_unit)

Either filename or in_unit must be given, but not both.

Parameters

var :: inout — Variable to read in to. The type of var can be any of the ones defined in qdyn_def_mod.

Options
  • filename :: character, in — If present, name of input file

  • in_unit :: integer, in — If present, read input from the given (open) file unit, instead of filename.

subroutine  qdyn_def_mod/read_dumped_array(...)

Read an array of QDYN-type variables from a dumped binary file.

The routines combined in this interface read a dumped binary file (as generated by dump_array()) in to an array. It is used as follows:

call read_dumped_array(array, n, in_unit)
Parameters
  • n :: inout — size(array)

  • array :: inout — Array to read in to. The type of array can be any of the ones defined in qdyn_def_mod, and it may have any rank and shape.

  • in_unit :: integer, in — Open unformatted file unit from which to read

subroutine  qdyn_def_mod/read_dumped_ascii(...)

Read a QDYN-type variable from a dumped ASCII file.

The routines combined in this interface read a dumped ASCII file (as generated by dump_ascii()) in to a variable. It is used as follows:

call read_dumped_ascii(var, filename, in_unit)

Either filename or out_unit must be given, but not both.

Parameters

var :: inout — Variable to read in to. The type of var can be any of the ones defined in qdyn_def_mod.

Options
  • filename :: character, in — If present, name of input file

  • in_unit :: integer, in — If present, read input from the given (open) file unit, instead of filename.

subroutine  qdyn_def_mod/read_dumped_ascii_array(...)

Read an array of QDYN-type variables from a dumped ascii file.

The routines combined in this interface read a dumped ascii file (as generated by dump_ascii_array()) from an open file unit in to an array of variables. It is used as follows:

call read_dumped_ascii_array(array, n, in_unit)
Parameters
  • n :: inout — size(array)

  • array :: inout — Array to read in to. The type of array can be any of the ones defined in qdyn_def_mod, and it may have any rank and shape.

  • in_unit :: integer, in — Open text file unit from which to read