Perturbation

class rhodent.perturbation.DeltaKick(strength)[source]

Delta-kick perturbation.

Parameters:

strength (float) – Strength of the perturbation in the frequency domain.

amplitude(times)[source]

Perturbation amplitudes in time domain.

Parameters:

times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

Return type:

Perturbation at the given times.

fourier(times, padnt=None)[source]

Fourier transform of perturbation.

Parameters:
  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • padnt (Optional[int]) – Length of data, including zero padding. Default is no added zero padding.

Return type:

Fourier transform of the perturbation at the frequency grid given by frequencies().

normalize_frequency_response(data, times, padnt, axis=-1)[source]

Calculate a normalized response in the frequency domain, i.e., the response to a unity strength delta kick. For example, polarizability.

Parameters:
  • data (ndarray[tuple[int, ...], dtype[float64]]) – Real valued response in the time domain to this perturbation.

  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • axis (int) – Axis corresponding to time dimension.

  • padnt (int) – Length of data, including zero padding.

Return type:

Normalized response in the frequency domain.

normalize_time_response(data, times, axis=-1)[source]

Transform response in the time domain to a “normalized response”, which is the response to a unity strength delta kick.

Parameters:
  • data (ndarray[tuple[int, ...], dtype[float64]]) – Real valued response in the time domain to this perturbation.

  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • axis (int) – Axis corresponding to time dimension.

Return type:

Normalized response in the time domain.

class rhodent.perturbation.NoPerturbation[source]

No perturbation

Used to indicate that we do not know the perturbation, and that it should not matter.

amplitude(times)[source]

Perturbation amplitudes in time domain.

Parameters:

times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

Return type:

Perturbation at the given times.

fourier(times, padnt=None)[source]

Fourier transform of perturbation.

Parameters:
  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • padnt (Optional[int]) – Length of data, including zero padding. Default is no added zero padding.

Return type:

Fourier transform of the perturbation at the frequency grid given by frequencies().

normalize_frequency_response(data, times, padnt, axis=-1)[source]

Calculate a normalized response in the frequency domain, i.e., the response to a unity strength delta kick. For example, polarizability.

Parameters:
  • data (ndarray[tuple[int, ...], dtype[float64]]) – Real valued response in the time domain to this perturbation.

  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • axis (int) – Axis corresponding to time dimension.

  • padnt (int) – Length of data, including zero padding.

Return type:

Normalized response in the frequency domain.

class rhodent.perturbation.Perturbation[source]

Perturbation.

abstract amplitude(times)[source]

Perturbation amplitudes in time domain.

Parameters:

times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

Return type:

Perturbation at the given times.

abstract fourier(times, padnt=None)[source]

Fourier transform of perturbation.

Parameters:
  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • padnt (Optional[int]) – Length of data, including zero padding. Default is no added zero padding.

Return type:

Fourier transform of the perturbation at the frequency grid given by frequencies().

frequencies(times, padnt=None)[source]

Get the frequencies grid.

Parameters:
  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • padnt (Optional[int]) – Length of data, including zero padding. Default is not zero padding.

Return type:

Frequencies grid in atomic units.

abstract normalize_frequency_response(data, times, padnt, axis=-1)[source]

Calculate a normalized response in the frequency domain, i.e., the response to a unity strength delta kick. For example, polarizability.

Parameters:
  • data (ndarray[tuple[int, ...], dtype[float64]]) – Real valued response in the time domain to this perturbation.

  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • axis (int) – Axis corresponding to time dimension.

  • padnt (int) – Length of data, including zero padding.

Return type:

Normalized response in the frequency domain.

normalize_time_response(data, times, axis=-1)[source]

Transform response in the time domain to a “normalized response”, which is the response to a unity strength delta kick.

Parameters:
  • data (ndarray[tuple[int, ...], dtype[float64]]) – Real valued response in the time domain to this perturbation.

  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • axis (int) – Axis corresponding to time dimension.

Return type:

Normalized response in the time domain.

class rhodent.perturbation.PulsePerturbation(pulse)[source]

Perturbation as a time-dependent function.

Parameters:

pulse (Laser | dict) – Object representing the pulse.

amplitude(times)[source]

Perturbation amplitudes in time domain.

Parameters:

times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

Return type:

Perturbation at the given times.

fourier(times, padnt=None)[source]

Fourier transform of perturbation.

Parameters:
  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • padnt (Optional[int]) – Length of data, including zero padding. Default is no added zero padding.

Return type:

Fourier transform of the perturbation at the frequency grid given by frequencies().

normalize_frequency_response(data, times, padnt, axis=-1)[source]

Calculate a normalized response in the frequency domain, i.e., the response to a unity strength delta kick. For example, polarizability.

Parameters:
  • data (ndarray[tuple[int, ...], dtype[float64]]) – Real valued response in the time domain to this perturbation.

  • times (ndarray[tuple[int, ...], dtype[float64]]) – Time grid in atomic units.

  • axis (int) – Axis corresponding to time dimension.

  • padnt (int) – Length of data, including zero padding.

Return type:

Normalized response in the frequency domain.