Inputs to qdsim
A simulation depends upon the specification of the system. This is done in the system TOML file, which specifies three different things:
- the
unitsin use - the Hamiltonian for the problem being simulated:
- the description of the
system - the description of the
bathor environment
- the description of the
Along with this system TOML file, a simulation TOML file also needs to be prepared that provides the details of the simulation.
System File
Each of the three sections in the system file has a dedicated function for parsing the data. Before giving a full example of a system input file, we discuss the parameters accepted by the various sections.
Specifying the Units
QuantumDynamicsCLI.ParseInput.parse_unit — Function
parse_unit(input_dict)Parses the [units] section of the system TOML file. It takes two variables:
Parameters obtained:
energy_unit_name[Default:ha]: Specifies the energy units. TypicallyeV,meV,cm^-1, orha.time_unit_name[Default:au]: Specifies the time units. Typicallyfs, orau.
Specifying the Hamiltonian
The basic problem under study has a general form, $\hat{H} = \hat{H}_0 + \hat{H}_\text{env}$, where $\hat{H}_0$ forms the system Hamiltonian and the $\hat{H}_\text{env}$ is the environment or bath Hamiltonian.
System Hamiltonian
QuantumDynamicsCLI.ParseInput.parse_system — Function
parse_system(sys_inp, unit)Parses the [system] portion of the system file for the Hamiltonian and converts it to atomic units for internal use.
Parameters obtained:
type[Default:real, Optionally:complex]: the type of elements in the Hamiltonian.Htype[Default:file]: How to parse the Hamiltonian file. Typicallyfileto read a file,nearest_neighborto specify the Hamiltonian as a nearest-neighbor tight-binding model, ornearest_neighbor_cavityfor a Hamiltonian consisting of a nearest-neighbor tight-binding part and a cavity with interacts with all the sites.
Then the Hamiltonian needs to be specified in the energy units that are being used. This can be done in several ways depending on the value of Htype:
- if
Htype=file, put in the variable,Hamiltonianwith the name of a file containing the elements of the Hamiltonian matrix. - if
Htype = "nearest_neighbor", specify the following variables:site_energy: the energy of each sitecoupling: the intersite coupling elementnum_sites: the number of sites
- if
Htype = "nearest_neighbor_cavity", in addition to the same variables as theHtype = "nearest_neighbor"case, also specify:cavity_energy: the energy of the cavity modecavity_coupling: coupling of the cavity to the monomers
The parameter is_QuAPI [Default: true] specifies if the specified system Hamiltonian should be interpreted to be a part of the QuAPI system-bath Hamiltonian form or not.
If external time-dependent fields have to be incorporated, the subsection [external_field] should be used. By default no external fields are involved. If used, the subsection would have two variables:
coupling_op: the operator through which the external time-dependent field interacts with the systemV_t: this is a single line expression which evaluates to the value of the field as a function of time, t. This variable needs to be calledt.
Bath Hamiltonian
QuantumDynamicsCLI.ParseInput.parse_bath — Function
parse_bath(baths, sys, unit)This function parses the bath(s) interacting with the system. Currently only harmonic baths are supported.
Parameters:
- The temperature for the simulation needs to be specfied. This can be done in one of two ways:
betain units of 1/ha for the inverse temperature $\beta = \frac{1}{k_BT}$.- or
temperaturein the units of Kelvin.
- A list of baths that interact with the system specified under
[[baths.bath]]heading in the TOML file. Each bath is parsed byQuantumDynamicsCLI.ParseInput.get_bath.
QuantumDynamicsCLI.ParseInput.get_bath — Function
get_bath(b, unit)Parse individual baths
Parameters:
type[Default:ohmic]: Type of harmonic bath. Can beohmic,drude_lorentz,tabular,tabular_jw_over_w,huang_rhysnum_osc: Number of oscillators to discretise the bath to
The parameters for the bath are specified in different ways for each different bath:
- if
type="ohmic", the bath spectral density $J(\omega)=\frac{2\pi}{\Delta s^2}\hbar\xi\omega_c\exp\left(-\frac{\omega}{\omega_c}\right)$xi: dimensionless Kondo parameter ($\xi$)omegac: cutoff frequency ($\omega_c$) in energy unitsDs[Default: 2]: $\Delta s$ value. Typically set to 1 for exciton transfer problems.npoints[Default: 100000]: Number of points used in integration for the influence functional coefficients.omega_max[Default:30.0 * omegac]: Upper limit of influence functional coefficient integrations
- if
type="drude_lorentz", the bath spectral density $J(\omega) = \frac{2\lambda}{\Delta s^2}\frac{\omega \gamma}{\omega^2+\gamma^2}$lambda: reorganization energy, $\lambda$, in energy unitsgamma: cutoff frequency, $\gamma$, in energy unitsDs[Default: 2]: $\Delta s$ value. Typically set to 1 for exciton transfer problems.npoints[Default: 100000]: Number of points used in integration for the influence functional coefficients.omega_max[Default:1000.0 * gamma]: Upper limit of influence functional coefficient integrations
- if
type="tabular", the bath spectral density is provided as a table in the file specified injw_file - if
type="huang_rhys", the bath spectral density is provided in the form of a table of frequency-dependent Huang-Rhys factors in the file specified inhuang_rhys_file
Specifying Operators
The specification of operators need to be specified in multiple places. Convenient shorthands for the specification of most commonly used operators. These can be used to specify the initial reduced density matrix as well.
QuantumDynamicsCLI.ParseInput.parse_operator — Function
parse_operator(op, Hamiltonian; mat_type::String="real")Return the matrix form of the operator op for the system with given Hamiltonian.
The following forms of op are recognised:
P_n: population of thenth state/the diagonal operator |n⟩⟨n|F_n: rate of change of population of thenthe stateO_n,m: the off-diagonal operator |n⟩⟨m|id: the identity operator- anything else is interpretted as a file which contains the matrix form of the operator
For the last item, mat_type can be the string "complex" which implies that the matrix is complex.
Simulation File
The simulation file has only a single TOML section [simulation]. Every simulation file should have a name to identify the simulation and an output file that specifies an HDF5 file for storing all the data.
There are broadly three types of simulations that are currently supported:
dynamicssimulations that simulate the non-equilibrium dynamics of the given problemequilibrium_rhosimulations that simulate the equilibrium density at the given temperaturecomplex_corrsimulations for calculating equilibrium correlation functions of various flavors
These are specified in the calculation field which, if unspecified, is taken to be dynamics by default.
The rest of the parameters required for a simulation file are specific to the type of simulation being run.