# Shaped pulse xy.m

Shaped pulse function using Cartesian coordinates. Applies a user-specified pulse shape on user-specified operators while the rest of the drift Liouvillian continues to affect the spin system. Syntax:

 [rho,P]=shaped_pulse_xy(spin_system,drift,controls,amplitudes,time_grid,rho)


Parameters:

      drift - the drift Liouvillian, the part of the Liouvillian that
should continue running in the background. This should
include the pulse frequency offset, if any.

   controls - cell array of control operators corresponding to each
channel, this may include operators for spatial degrees
of freedom.

 amplitudes - a cell array of control amplitude vectors {ncontrols}
(nsteps), in angular frequency units. Order of cell array
corresponds to the same order of the control operator
cell array.

  time_grid - a vector containing the duration (not time position!)
of each pulse slice, seconds.

        rho - state vector of the initial state, or a stack thereof.


The pulse is assumed to be piecewise-constant and should be supplied with sufficiently fine time discretization to properly reproduce the waveform.

Outputs:

        rho - the final state vector or a stack thereof

          P - total pulse propagator


Note: pulse propagators are expensive, do not request unless you really need that propagator.

Revision 3141, authors: Ilya Kuprov