# addDecoherence

Implements a pure dephasing process via the Lindblad master equation in a specified subsystem

## Contents

- Syntax
- Description
- Detailed Description and Examples
- Example of a qbit coupled to a lightfield.

## Syntax

- addDecoherence(name,decay_time)
- addDecoherence(name,decay_time,levels)
- addDecoherence(interval,name,decay_time,levels)

## Description

- addDecoherence(name,decay_time) adds a decoherence effect with decay time of decay_time to the subsystem with name name.
- addDecoherence(name,decay_time,levels) levels takes a vector of length 2. Adds a decoherence effect with decay time of decay_time between the levels levels(2) and levels(1) to the subsystem with name name.
- addDecoherence(interval,name,decay_time) interval takes a vector of length 2. Adds a decoherence effect with decay time of decay_time to the subsystem with name name, within the timeframe specified by interval(1) and interval(2).

## Detailed Description and Examples

Decoherence between different levels within one subsystem is realised by the Lindblad master equation. The Liouville von Neumann Equation is expanded by an additional term, resulting in:

where denotes the jumping Operator. If takes on a specific form, the Lindblad equation models a pure loss of phase information between the different levels of a subsystem. This loss progresses with a lifetime of .

## Example of a qbit coupled to a lightfield.

    s = System;
    s.addEntity(Nlevel(1),'qbit');
    s.addEntity(Qoscillator(3,1),'lightfield');
    s.addCoupling('qbit','lightfield',0.05);
    s.addDecoherence('qbit',40);
    s.addExternalField(Gausspulse(0.04,50,15,1),'qbit');
    s.setTimestep(0.1);
    s.simulate();

    %plot the gained data
    plot(s.time, s.getEnergy('qbit'));
    hold on;
    plot(s.time, s.getEnergy('lightfield'));
    plot(s.time, s.getOpValue(s.H));
    s.plotEfields;
    xlabel('Time');
    ylabel('Energy');
    title('Qbit Coupled to a Lightfield');
    thelegend = legend('qbit' ,'lightfield','total','laserpuls','Location','northeast');
    set(thelegend,'FontSize',16);