src/Pulses/PulComposite.cc
/* These functions allow for the filling up two arrays of Liouville space
   propagators for each step in the waveform (Gsteps and Gsums).  These will
   NOT be generated during construction of the composite pulse although they
   are system dependent.  Rather, they will be generated when requested if the
   step Hamiltonians are present.					     */
These functions allow for the filling up two arrays of Liouville space
propagators for each step in the waveform (Gsteps and Gsums).  These will
NOT be generated during construction of the composite pulse although they
are system dependent.  Rather, they will be generated when requested if the
step Hamiltonians are present.
These functions allow for the filling up two arrays of Liouville space propagators for each step in the waveform ( Gsteps and Gsums ) . These will NOT be generated during construction of the composite pulse although they are system dependent . Rather they will be generated when requested if the step Hamiltonians are present .
void PulComposite::SetGs( )
  {
  if(!WFsteps) return;			
  if(!CheckH(10,20)) CPulfatality(21);	
  if(!Lsteps) SetLs();			
  if(!Gsteps)Gsteps=new LSprop[WFsteps];
  if(!Gsums) Gsums=new LSprop[WFsteps];	
  if(!Uindex) SetUIndxs( );		
  if(!SigSSs) SetSSs();			
  double tinc;				
  int i=0, idx=0;
  densop sigss;
  for(i=0; i<WFsteps; i++)
    {
    idx = Uindex[i];			
    if(i == idx)			
      {					
      tinc = WFtimes.getRe(i);		
      Gsteps[i] =			
         LSprop(Leff(i),SigSS(i),tinc);
      }
    Gsums[i] = Gsteps[idx];		
    if(i) Gsums[i] *= Gsums[i-1];       
    }
  }
void PulComposite :: SetGs ( ) { if ( ! WFsteps ) return ; if ( ! CheckH ( 10 , 20 ) ) CPulfatality ( 21 ) ; if ( ! Lsteps ) SetLs ( ) ; if ( ! Gsteps ) Gsteps = new LSprop [ WFsteps ] ; if ( ! Gsums ) Gsums = new LSprop [ WFsteps ] ; if ( ! Uindex ) SetUIndxs ( ) ; if ( ! SigSSs ) SetSSs ( ) ; double tinc ; int i = 0 , idx = 0 ; densop sigss ; for ( i = 0 ; i < WFsteps ; i ++ ) { idx = Uindex [ i ] ; if ( i == idx ) { tinc = WFtimes . getRe ( i ) ; Gsteps [ i ] = LSprop ( Leff ( i ) , SigSS ( i ) , tinc ) ; } Gsums [ i ] = Gsteps [ idx ] ; if ( i ) Gsums [ i ] *= Gsums [ i - 1 ] ; } }
These functions allow for the filling up two arrays of Liouville space
propagators for each step in the waveform (Gsteps and Gsums).
These functions allow for the filling up two arrays of Liouville space propagators for each step in the waveform ( Gsteps and Gsums ) .
// Input                CPul    : A composite pulse (this) // Output               void	: Superpropagators for each step //				  of the composite pulse are calculated // Note				: This assumes that the Hamiltonians //                                have already been calculated! // Note				: Assumes the relaxation superoperator //				  has already been set // Note				: G[i] is superpropagator that evolves //                                the system from the start of the //				  composite pulse to the end of step i // Note			        : Doesn't destroy any HS propagators // Nothing if no steps specified // Insure Hamiltonians exist // Construct H superops if needed // Allocate superprop space if needed // Allocate sum superprop space // Set propagator indices	 // Set up steady state density ops // Time increment per step  // Index of propagator // If unique step propagator // then we have to calculate it // Step i length // Prop of step i's evolution // Start prop step i full evolve // Add all previous steps evolutions