TwoLevelSystems

This module collects some tools to deal with the physics of Two Level Systems (TLS). This modeling is particularly useful to describe both electromagnetic transition between two optically active bands and magnetic system in which a time-dependent magnetic field induces oscillations between two (non degenerate) states with different spin.

The feature of the model, as well as the derivation of the equation used in this implementation of the physics of the TLS are described in this notebook.

mppi.Models.TwoLevelSystems.convertToRotatingFrame(omega, time, u, invert=False)[source]

Convert the Bloch vector components to the rotating frame (from the u_i to the u’_i). If the invert argument is True perform the inverse change of basis (from the u’_i to the u_i).

Parameters:
  • omega (float) – angular frequency of the pulse, expressed in the reciprocal unit of the time variable

  • time (array) – array with the time values

  • u (array) – array with the Bloch vector in the original frame. The function assumes that the array has two indices, the first is the component and the second one is the time index

  • invert (bool) – if True perform the inverse transformation

Returns:

array with the transformed Bloch vector

Return type:

(array)

mppi.Models.TwoLevelSystems.pulseParametersFromIntensity(mu12, intensity, width=100, fwhm=None, THz_pulse=False, verbose=True)[source]

Compute the Rabi coupling frequency and the area of the Gaussian pulse in function of the values of the transition dipole \(\mu_{12}\) and of the field intensity.

Parameters:
  • mu12 (complex) – complex value of the transition dipole \(\mu_{12}\) that enters in the definition of the Rabi coupling

  • intensity (float) – field intensity in kW/cm^2

  • width (float) – width parameter of the Gaussian pulse (in fs)

  • fwhm (float) – if not None set the FWHM of the pulse (in fs). The width is set to \(fwhm/(2\sqrt{2ln(2)})\)

  • THz_pulse (bool) – if True expresses the width and the fwhm parameters in ps

  • verbose (bool) – sets the amount of information provided on terminal

Returns:

a dictionary withe the (generally complex) Rabi coupling,

the field amplitude (in V/m) and the pulse area

Return type:

dict

mppi.Models.TwoLevelSystems.pulseParametersFromTheta(mu12, theta, width=100, fwhm=None, THz_pulse=False, verbose=True)[source]

Compute the field intensity and the Rabi coupling that correspond to the area of the Gaussian pulse given as input.

Parameters:
  • mu12 (complex) – complex value of the transition dipole \(\mu_{12}\) that enters in the definition of the Rabi coupling

  • theta – pulse area

  • width (float) – width parameter of the Gaussian pulse (in fs)

  • fwhm (float) – if not None set the FWHM of the pulse (in fs). The width is set to \(fwhm/(2\sqrt{2ln(2)})\)

  • THz_pulse (bool) – if True expresses the width and the fwhm parameters in ps

  • verbose (bool) – sets the amount of information provided on terminal

Returns:

a dictionay with the (generally complex) Rabi coupling,

the field amplitude (in V/m) and the field intensity (in kW/cm^2)

Return type:

dict

mppi.Models.TwoLevelSystems.solveBlochEq(u0, time, Omega, delta=0, eta=0)[source]

Solve the Bloch equations in the rotating frame.

Parameters:
  • x0 (array) – initial condition

  • time (array) – array with the time values

  • Omega (function) – (complex) envelope function

  • delta (float) – difference between pulse energy and the energy shift of the two levels of the system. It has to be provided in the inverse dimensions of the time variable

  • eta (float) – dephasing parameter for the polarization (u1 and u2 elements of the Bloch vector). It has to be provided in the inverse dimensions of the time variable

Returns:

array with the solution of the Bloch equations.

The index shape of the array is (3,len(time))

Return type:

(array)

mppi.Models.TwoLevelSystems.solveBlochEq_Real(u0, time, Omega, delta=0, eta=0)[source]

Solve the Bloch equations in the rotating frame. This function assumes that the provided Rabi coupling is real and positive.

Parameters:
  • u0 (array) – initial condition

  • time (array) – array with the time values

  • Omega (function) – (real) envelope function built in terms of the module of the Rabi coupling

  • delta (float) – difference between pulse energy and the energy shift of the two levels of the system. It has to be provided in the inverse dimensions of the time variable

  • eta (float) – dephasing parameter for the polarization (u1 and u2 elements of the Bloch vector). It has to be provided in the inverse dimensions of the time variable

Returns:

array with the solution of the Bloch equations.

The index shape of the array is (3,len(time))

Return type:

(array)