qtcad.qubit.noise module

Class used to understand dynamics of two-level systems under the influence of noise.

class qtcad.qubit.noise.Noise

Bases: qubit.core.noise.Noise

Class used to understand dynamics of two-level systems under the influence of noise.

dynamics(H0, delta_V, omega, spectrum, T0, psi0, times, operator, vec_omega=None, num_runs=1, avg=True, seed=None)

Calculates the expectation value of an operator as a function of time.

Parameters
  • H0 (2D array) – Diagonalized system Hamiltonian.

  • delta_V (2D array) – Drive that can initiate transitions between eigenstates of H0.

  • omega (float) – Frequency of the drive and of the rotating frame.

  • spectrum (1D array) – Spectral density of the noise.

  • T0 (float) – Period of the noise process.

  • psi0 (qutip Qobj) – Initial state.

  • times (1D array) – Times at which to solve for the expectation value of the operator.

  • operator (2D array or qutip Qobj) – operator for which we want the expectation value as a function of time.

  • vec_omega (1D array) – The frequencies at which the spectral function is evaluated. If None, the noise spectral function is assumed to be evaluated at harmonics omega_k = 2*pi*k/T0.

  • num_runs (integer) – Number of runs to perform.

  • avg (boolean) – Whether or not the average of the runs should be computed.

  • seed (integer) – Default is None. If not None, the random processes will be initialized with the given seed.

Returns

numpy array – Array containing the expectation value of the operator for each run (if avg = False) or containing the average over all runs (if avg = True). In the former case the output is a 2D array and in the later it is a 1D array.

gen_process(times, spectrum, wk, T0)

Generate one realization of a Gaussian random process.

Parameters
  • times (1d array) – Times at which the process is evaluated

  • spectrum (1d array) – Spectrum at harmonics omega_k = 2*pi*k/T0

  • T0 (float) – Period of the noise process.

Returns

1d array – random process at times specified in input

Note

T0 should be the largest timescale in the problem. Otherwise the noise process will repeat itself periodically.