src/Pulses/PulTrain.cc
/* These functions allow access and production of propagators while the pulse
   train is active.  Remember, the waveform sets individual steps of the
   composite pulse.  It is cycled through with the phase changes specified
   in the pulse cycle.  The full cycle is cycled through with phase changes
   specified in the pulse supercycle.                                        */
These functions allow access and production of propagators while the pulse
train is active.  Remember, the waveform sets individual steps of the
composite pulse.  It is cycled through with the phase changes specified
in the pulse cycle.  The full cycle is cycled through with phase changes
specified in the pulse supercycle.
These functions allow access and production of propagators while the pulse train is active . Remember the waveform sets individual steps of the composite pulse . It is cycled through with the phase changes specified in the pulse cycle . The full cycle is cycled through with phase changes specified in the pulse supercycle .
HSprop PulTrain::GetU(double td)
  {
  double te = td;                       
  int nFSC  = PTSCyc.fullSCYCs(te);	
  te -= nFSC * PTSCyc.length();		
  int nFC   = PTCyc.fullcycles(te);	
  te -= nFC * PTCyc.length();		
  int nFWF = fullWFs(te);               
  te -= nFWF*WFtp;			
//  te -= length(nFWFS);                  
  HSprop USCs;				
  HSprop UCs;				
  HSprop UWFs;				
  HSprop UWFsteps;			
  double SCphi;				
  double Cphi;				
  gen_op RZ;
  if(SCycles)				
    {
    USCs     = PTSCyc.GetUmult(nFSC);	
    UCs      = PTSCyc.GetUsum(nFC);	
    UWFs     = PTCyc.GetUsum(nFWF);	
    UWFsteps = PulComposite::GetU(te);	
    SCphi    = PTSCyc.phase(nFC);	
    RZ=exp((-complexi*SCphi*DEG2RAD)*FZ());
    }
  else if(Cycles)			
    {
    UCs      = PTSCyc.GetUmult(nFC);	
    UWFs     = PTCyc.GetUsum(nFWF);	
    UWFsteps = PulComposite::GetU(te);	
    Cphi    = PTSCyc.phase(nFC);	
    RZ = exp((-complexi*Cphi*DEG2RAD)*FZ());
    }
  double phi = PTSCyc.phase(nFC);		
  gen_op Rz = exp((-complexi*phi*DEG2RAD)*FZ());
  HSprop   U  = UWFsteps;		
std::cout << "\nSteps & Partial Steps: " << U.length();
  if(nFWF) U *= UWFs;		
std::cout << "\nFull Waveforms: " << U.length();
  if(nFC)  U *= UCs;		
std::cout << "\nFull Cycles: " << U.length();
  if(nFSC) U *= USCs;		
std::cout << "\nFull Supercycles: " << U.length();
  return U;           
  }
HSprop PulTrain :: GetU ( double td ) { double te = td ; int nFSC = PTSCyc . fullSCYCs ( te ) ; te -= nFSC * PTSCyc . length ( ) ; int nFC = PTCyc . fullcycles ( te ) ; te -= nFC * PTCyc . length ( ) ; int nFWF = fullWFs ( te ) ; te -= nFWF * WFtp ; HSprop USCs ; HSprop UCs ; HSprop UWFs ; HSprop UWFsteps ; double SCphi ; double Cphi ; gen_op RZ ; if ( SCycles ) { USCs = PTSCyc . GetUmult ( nFSC ) ; UCs = PTSCyc . GetUsum ( nFC ) ; UWFs = PTCyc . GetUsum ( nFWF ) ; UWFsteps = PulComposite :: GetU ( te ) ; SCphi = PTSCyc . phase ( nFC ) ; RZ = exp ( ( - complexi * SCphi * DEG2RAD ) * FZ ( ) ) ; } else if ( Cycles ) { UCs = PTSCyc . GetUmult ( nFC ) ; UWFs = PTCyc . GetUsum ( nFWF ) ; UWFsteps = PulComposite :: GetU ( te ) ; Cphi = PTSCyc . phase ( nFC ) ; RZ = exp ( ( - complexi * Cphi * DEG2RAD ) * FZ ( ) ) ; } double phi = PTSCyc . phase ( nFC ) ; gen_op Rz = exp ( ( - complexi * phi * DEG2RAD ) * FZ ( ) ) ; HSprop U = UWFsteps ; std :: cout << " \n " << U . length ( ) ; if ( nFWF ) U *= UWFs ; std :: cout << " \n " << U . length ( ) ; if ( nFC ) U *= UCs ; std :: cout << " \n " << U . length ( ) ; if ( nFSC ) U *= USCs ; std :: cout << " \n " << U . length ( ) ; return U ; }
These functions allow access and production of propagators while the pulse
train is active.
These functions allow access and production of propagators while the pulse train is active .
// Input		PT 	: A pulse train (this) //			td	: A delay time(sec) // Output               U	: The propagator for evolving a system //				  under the pulse train for time td //                      Determine Evolution Steps // Evolution time // Number of full supercycles // Time to evolve remaining // Number of full cycles // Time to evolve remaining // Number of full waveforms // Time to evolve reamaining //  int nFWFS = fullsteps(te);            // Number of full waveform steps //  te -= length(nFWFS);                  // Time to evolve reamaining //                      Build HS Propagators For Steps //	 	(We Must Also Account For Cycle Phase Changes) // For full supercycles // For full cycles // For full waveforms // For waveform steps // for supercycle phase // For cycle phase // If supercycles defined // Evolve nFSC full supercycles // Evolve nFC full cycles // Evolve nFWF full waveforms // Evolve waveform steps // S.C. phase, last part cycle // Rotation op. for this phi // If cycles defined // Evolve nFC full cycles // Evolve nFWF full waveforms // Evolve waveform steps // S.C. phase, last part cycle // Rotation op. for this phi // S.C. phase, last part cycle // Rotation op. for this phi // sosix need to phase UWFs & UWFsteps //             Build Full HS Propagator For Steps, REVERSE Order //	 	(These Already Account For Cycle Phase Changes) // Evolve over waveform steps // Evolve over waveforms // Evolve over cycles // Evolve over supercycles