EvolutionSuperOperator

Class representing evolution superoperator

This class represents evolution superoperator at discrete times.

Examples

Evolution superoperator can be created from a known Hamiltonian and relaxation tensor

>>> import quantarhei as qr
>>> # We use the predefined Aggregate - dimer of two-level systems
>>> # with an environment
>>> tagg = qr.TestAggregate(name="dimer-2-env")
>>> tagg.set_coupling_by_dipole_dipole()
>>> tagg.build()
>>> # we get the existing predefined time axis for the calculations
>>> time = tagg.get_SystemBathInteraction().TimeAxis
>>> print(time.start, time.length, time.step)
0 1000 1.0

We create relaxation tensor and obtain renormalized Hamiltonian from standard Redfield theory (stR)

>>> RR, HH = tagg.get_RelaxationTensor(time, relaxation_theory="stR")

We initialize evolution superoperator

>>> eSO = EvolutionSuperOperator(time, ham=HH, relt=RR)
>>> eSO.calculate()

We create initial condition. Dimension of the problem is 3 (ground state and two excited states of the dimer)

>>> dim = HH.dim
>>> print(dim)
3
>>> rho = qr.ReducedDensityMatrix(dim=dim)
>>> rho.data[2,2] = 1.0

Now we calculate density matrix evolution using a propagator

>>> prop = tagg.get_ReducedDensityMatrixPropagator(time,
...                                                relaxation_theory="stR")
>>> rhot = prop.propagate(rho)

Comparing the results at one point can be done like this:

>>> rhot_eSO = eSO.apply(100.0, rho)
>>> dat_100_eSO = rhot_eSO.data
>>> dat_100     = rhot.data[100,:,:]
>>> numpy.allclose(dat_100_eSO, dat_100)
True

To see the full aggreement, we may plot all the times calculated with both methods. We plot the dynamics calculated using the evolution superoperator only every 20 fs using asterisks “*”

(Source code, png, hires.png, pdf)

../_images/evolsupop-1.png

We may want to calculate the evolution superoperator with a step larger than the one which we specified for evaluation of bath correlation functions (In this example we use predefined SystemBathInteraction object which holds this information). Our time axis is too dense for our needs. We specify a less dense one

>>> time2 = qr.TimeAxis(0.0, 1000, 50.0)

This one has the step of 50 fs. We define an evolution superoperator with this time:

>>> eSO2 = qr.qm.EvolutionSuperOperator(time2, HH, RR)

Now, to obtain the same results as before, we need to set a time step of the propagation to 1 fs as before. This is done by setting a “dense” time step with is N times shorter than the one specified in the time axis. In our case N = 50

>>> eSO2.set_dense_dt(50)
>>> eSO2.calculate()
>>> rhot_eSO = eSO.apply(100.0, rho)
>>> dat_100_eSO = rhot_eSO.data
>>> numpy.allclose(dat_100_eSO, dat_100)
True

We can calculate a similar picture as before, but now with an evolution superoperator calculated only every 50 fs.

(Source code, png, hires.png, pdf)

../_images/evolsupop-2.png

Class Details

class quantarhei.qm.liouvillespace.evolutionsuperoperator.EvolutionSuperOperator(time=None, ham=None, relt=None, pdeph=None, mode='all', block=None)[source]

Class representing evolution superoperator

Parameters:
  • time (TimeAxis) – TimeAxis obejct specifying the time points of the superoperator
  • ham (Hamiltonian) – Hamiltonian of the system
  • relt (relaxation tensor) – Relaxation tensor of the system
  • mode (str) – Mode of information storage. It can be “all” which means that all points of the evolution are stored, or it can be “jit” = just in (one) time. In the “jit” mode, only the “present” time of the evolution operator is stored.
  • block (tuple) – Evolution Superoperator is usually defined on the Liouville space derived from the complete system’s Hilbert space. We can specify a smaller block section of elements in the Liouville space, to limit the size of the calculation. Typical situation is calculate only the optical coherence block neede for the calculation of absorption spectra.
Attributes:
cutoff_time
data

Methods

apply(time, target[, copy]) Applies the evolution superoperator at a given time
at([time]) Retruns evolution superoperator tensor at a given time
calculate([show_progress]) Calculates the data of the evolution superoperator
calculate_next([save]) Calculates one point of data of the superopetor
convert_from_RWA([ham, sgn]) Converts evolution superoperator from RWA to standard repre
convert_to_RWA(ham) Converts evolution superoperator from standard repre to RWA
copy() Returns a shallow copy of the self
deepcopy() Returns a deep copy of the self
get_Hamiltonian() Returns the Hamiltonian associated with thise evolution
get_element_fft(elem[, window]) Returns a DFunction with the FFT of the element evolution
get_fft([window, subtract_last]) Returns Fourier transform of the whole evolution superoperator
has_PureDephasing() Return True if the EvolutionSuperOperator has pure dephasing
load(filename[, test]) Loads an object from a file and returns it
loaddir(dirname) Returns a directory of objects saved into a directory
plot_element(elem[, part, show]) Plots a selected element of the evolution superoperator
save(filename[, comment, test]) Saves the object with all its content into a file
savedir(dirname[, tag, comment, test]) Saves an object into directory containing a file with unique name
scopy() Creates a copy of the object by saving and loading it
set_PureDephasing(pdeph) Sets the PureDephasing object for the dynamic calculation
set_dense_dt(Nt) Set a denser time axis for calculations between two points of the superoperator
transform(SS[, inv]) Transforms the superoperator to a new basis
update_dense_time(i) Update the start time of the dense_time
get_current_basis  
protect_basis  
set_current_basis  
set_cutoff_time  
unprotect_basis  
apply(time, target, copy=True)[source]

Applies the evolution superoperator at a given time

Parameters:
  • time (float, array (list, tupple) of floats or TimeAxis) – Time(s) at which the evolution superoperator should be applied
  • target (DensityMatrix, ReducedDensityMatrix) – Operator which the evolution superoperator should be applied
  • copy (bool) – If True, the target object is copied and new value is assigned to its data attribute. If False, we assign the new values to the target object itself and no copying occurs.
at(time=None)[source]

Retruns evolution superoperator tensor at a given time

Parameters:time (float, None) – Time (in fs) at which the tensor should be returned. If time is None, the whole data object is returned
calculate(show_progress=False)[source]

Calculates the data of the evolution superoperator

Parameters:show_progress (bool) – When set True, reports on its progress and elapsed time

This function MUST NOT be called from within an eigenbasis_of context

calculate_next(save=False)[source]

Calculates one point of data of the superopetor

convert_from_RWA(ham=None, sgn=1)[source]

Converts evolution superoperator from RWA to standard repre

Parameters:
  • ham (qr.Hamiltonian) – Hamiltonian with respect to which we construct RWA. If none is specified, internal Hamiltonian is used. This is the most natural use of this function.
  • sgn ({1, -1}) – Forward (1) or backward (-1) conversion. Default sgn=1 corresponds to the function name. Backward conversion sgn=-1 is called from the inverse routine.
convert_to_RWA(ham)[source]

Converts evolution superoperator from standard repre to RWA

Parameters:ham (qr.Hamiltonian) – Hamiltonian with respect to which we construct RWA
get_Hamiltonian()[source]

Returns the Hamiltonian associated with thise evolution

get_element_fft(elem, window=None)[source]

Returns a DFunction with the FFT of the element evolution

get_fft(window=None, subtract_last=True)[source]

Returns Fourier transform of the whole evolution superoperator

Parameters:
  • window (DFunction or numpy array) – Windowing function by which the data are multiplied
  • subtract_last (bool) – If True, the value at the last available time is subtracted from all times
has_PureDephasing()[source]

Return True if the EvolutionSuperOperator has pure dephasing

plot_element(elem, part='REAL', show=True)[source]

Plots a selected element of the evolution superoperator

Parameters:elem (tuple) – A tuple of indices determing the element of the superoperator
set_PureDephasing(pdeph)[source]

Sets the PureDephasing object for the dynamic calculation

set_dense_dt(Nt)[source]

Set a denser time axis for calculations between two points of the superoperator

Parameters:Nt (int) – Number of steps between two points of the superoperator to be used for numerical propagation
update_dense_time(i)[source]

Update the start time of the dense_time