addExternalField

Adds an external Field to the simulation in a semiclassical way

Contents

Syntax

Description

Detailed Description and Examples

The Hamiltonian which is created by a classical external field reads

$$H_e(t) = E(t)\cdot(u + u^{\dagger})$$

where $E(t)$ is the time dependent classical field and $u$ is the dipole matrix of the subsystem the external field interacts with. Any kind of classical field can be given to the function. This is done via a function pointer to a function that takes a time vector as input.

Defining a function pointer for a classical short Gaussian laser pulse

function out = Gaussianpulse( amp,td,tp,we) %td = delay time, tp = pulsewidth, we = frequency

    out = @inner;
    function exF = inner(t)
        exF = amp*exp(-2*log(2)*((t-td)/(tp)).^2) .* cos(we*(t-td)); %Gaussian pulse
    end
end
ans = 

    @addExternalField_doc/inner

The above function outputs a function pointer to the inner function which computes the Gaussian pulse. To implement any function just replace the function body of inner(t) and the parameters at the top (Gaussianpulse(parameters)).