pink_noise.m

From Spinach Documentation Wiki
Jump to: navigation, search

Trajectories of a real random process with a 1/f power spectral density S(omega)=amp^2/|omega/2pi| between an infrared and an ultraviolet cutoff, synthesised in the frequency domain: every Fourier component within the band receives a complex Gaussian amplitude with the variance set by the spectral density, and the inverse FFT returns the time domain trajectory (Timmer and Koenig, Astron. Astrophys. 300, 707, 1995). The positive frequency bins of the grid are those below the Nyquist bin; within the band, the standard deviation of the quadrature amplitudes is sqrt(2*amp^2/(f*npts*dt)); the complex spectrum is filled in the Matlab ifft normalisation and the real trajectories are twice the real part of the inverse transform of the positive frequency half.

Syntax

          trajs=pink_noise(amp,dt,npts,ntraj,f_ir,f_uv)

Parameters

   amp    - noise amplitude, the two-sided spectral density
            is amp^2/|f| in units of [amp]^2/Hz
   dt     - sampling interval, seconds
   npts   - number of points in each trajectory
   ntraj  - number of trajectories
   f_ir   - infrared cutoff frequency, Hz, not below the
            frequency resolution 1/(npts*dt)
   f_uv   - ultraviolet cutoff frequency, Hz, not above the
            Nyquist frequency 1/(2*dt)

Outputs

   trajs  - trajectories, [ntraj x npts] real array, the
            variance of each point is 2*amp^2*sum(1./k) over
            the synthesised bin indices k, which approaches
            2*amp^2*log(f_uv/f_ir) for bands with many bins

Examples

See cavity_safe_dephasing.m and cavity_binomial_safe.m in examples/quantum_tech/circuit_qed directory.

Notes

The trajectories are periodic with the period npts*dt; use a duration well above 1/f_ir to avoid artefacts. The band must contain at least one grid frequency below the Nyquist frequency; the Nyquist bin itself is not synthesised because it has no independent quadrature.

See also

Kernel utilities

Version 2.13, authors: Ilya Kuprov