- class atomcalc.Decay(rates, final_states)[source]
An object that describes the decay of the system with the decay rates and the respective transitions.
- Parameters:
rates (list) – value for
rates
final_states (list) – value for
final_states
- rates
A list of decay rates.
- Type:
list
- final_states
A list of tupels of
Level
objects that assign the decay rates to a corresponding transition.- Type:
list
Example
>>> Decay([0, 1], [[Level(20), Level(0)], [Level(5), Level(0)]]) The transition between Level(20) and Level(0) is assigned a decay rate of 0. The transition between Level(5) and Level(0) is assigned a decay rate of 1.
- class atomcalc.Laser(rabifreq, detuning, couple, polarization=None, pulse=None)[source]
An object that describes values for a laser: Rabi frequency, frequency, and coupled states. One laser only affects the one specific transition that is defined in the couple parameter.
- Parameters:
- rabifreq
Rabi frequency of the laser as angular frequency.
- Type:
number
- frequency
The angular frequency of the laser. Represents the energy gap of the transition.
- Type:
number
- detuning
The detuning of the laser.
- Type:
number
- pulse
A time dependent function of the Rabi frequency of the laser OR a list of numbers describing a Rabi frequency pulse.
- Type:
None or function or list
Example
>>> Laser(1, 100, [Level(0),Level(20)]) The transition between Level(20) and Level(0) is assigned a laser with Rabi frequency of 1 and a frequency of 100.
Note
Level couples need to be sorted by energy in ascending order.
- class atomcalc.Level(energy)[source]
An object that describes an energy level.
- Parameters:
energy (number) – value for
energy
- energy
The energy of the level given as angular frequency.
- Type:
number
Example
>>> Level(5) This is a Level object with an energy of 5, given as an angular frequency.
- atomcalc.plot_pulse(pulse, tlist)[source]
A function to plot a pulse function.
- Parameters:
pulse (function) – A time dependent pulse function.
tlist (list) – A list of points in time where the pulse should be plotted.
- class atomcalc.System(levels, lasers, decay)[source]
An object that inherits all parameters used for simulation of the system.
- Parameters:
- dim
Number of levels.
- Type:
number
Example
>>> level1 = Level(0) >>> level2 = Level(20) >>> level3 = Level(100) >>> laser1 = Laser(1, 120, [level1,level3]) >>> laser2 = Laser(1, 100, [level2,level3]) >>> decay = Decay([0],[[level3,level1]]) >>> system = System([level1, level2, level3], [laser1,laser2], decay)
Note
Levels need to be sorted by energy in ascending order.
- simulate(initial_state_index_list, level_to_print_max_value, maxtime, delta_stark_shift=0, Diagonalization=True, plot_pop=True, Trotterintervals=500, points_per_TI=2, resolution=250)[source]
A function to simulate the time evolution of the population of every level. It also returns the maximum population of specifically the level_to_print_max_value.
- Parameters:
initial_state_index_list (list) – value for
initial_state_index_list
level_to_print_max_value (number) – value for
level_to_print_max_value
maxtime (integer) – value for
maxtime
delta_stark_shift (number) – value for
delta_stark_shift
Diagonalization (bool) – value for
Diagonalization
plot_pop (bool) – value for
plot_pop
Trotterintervals (number) – value for
Trotterintervals
points_per_TI (number) – value for
points_per_TI
resolution (number) – value for
resolution
- initial_state_index_list
Initial population distribution. First entry denotes the population of the first level and so on. Length of the list needs to be equal to the level-count and the entries need to sum up to one.
- Type:
list
- level_to_print_max_value
Just affects the output. Determines which levels population maximum is printed in the output. 0 is the first level.
- Type:
number
- maxtime
Maximum time the system is simulated.
- Type:
integer
- delta_stark_shift
Detuning of the first level.
- Type:
number
- Diagonalization
If False, simulate the system with the integration method ‘qutip.mesolve’ from QuTiP. If True, simulate the system using diagonalization.
- Type:
bool
- plot_pop
If False, do not show the population plot.
- Type:
bool
- Trotterintervals
Only relevant if a pulse is given. Discretizes the pulse into a step function of Trotterintervals time intervals.
- Type:
number
- points_per_TI
Only relevant if a pulse is given. Divides one trotterinterval in points_per_TI intervals. This determines the number of points calculated within one trotterinterval.
- Type:
number
- resolution
Only relevant if Diagonalization = True and no pulse is given. Divides the simulation time interval into resolution uniformly distributed points of time.
- Type:
number