src/IntRank2/HQuadrup.cc
/*       These are SECULAR (Rotationally Invariant About Bo Field Axis)
     Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman
 
   This is just a blend of the two Hamiltonians returned in sections A and B.
   It should be added to the Zeeman interaction Hamiltonian (in the rotating
   or multiply rotating frame).

                                  (0)    (1)      [1]    [2]
                         H    =  H    + H     =  H    + H
                          Q       Q      Q        Q      Q

        // Input                sys  : Spin system
	//			i    : Spin index
        // Output               HQw  : The secular part of the quadrupolar
        //                             Hamiltonian (default basis, Hz)
	//			       for the spin i
	// Note			     : This is the sum of the 1st & 2nd order
	//			       quadrupolar interactions (pert. theory)
	// Note			     : This is rotationally invariant about z
	// Note			     : This will return in the spin Hilbert
	//			       space of the spin system              */
These are SECULAR (Rotationally Invariant About Bo Field Axis)
Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman

This is just a blend of the two Hamiltonians returned in sections A and B.
It should be added to the Zeeman interaction Hamiltonian (in the rotating
or multiply rotating frame).



Input                sys  : Spin system
i    : Spin index
Output               HQw  : The secular part of the quadrupolar
Hamiltonian (default basis, Hz)
for the spin i
Note                      : This is the sum of the 1st & 2nd order
quadrupolar interactions (pert. theory)
Note                      : This is rotationally invariant about z
Note                      : This will return in the spin Hilbert
space of the spin system
These are SECULAR ( Rotationally Invariant About Bo Field Axis ) Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman This is just a blend of the two Hamiltonians returned in sections A and B . It should be added to the Zeeman interaction Hamiltonian ( in the rotating or multiply rotating frame ) . Input sys : Spin system i : Spin index Output HQw : The secular part of the quadrupolar Hamiltonian ( default basis Hz ) for the spin i Note : This is the sum of the 1st & 2nd order quadrupolar interactions ( pert . theory ) Note : This is rotationally invariant about z Note : This will return in the spin Hilbert space of the spin system
gen_op HQw(const solid_sys& sys)
  {
  int ns = sys.spins();                         
  std::vector<int> HSs = sys.HSvect();               
  double Om;					
  matrix H;                                     
  IntQuad Q;                                    
  for(int i=0; i<ns; i++)                       
    {
    Q  = sys.getQuadInt(i);			
    Om = sys.Omega(i)*1.e6;			
    H += Q.Hw(HSs, i, Om);			
    }
  return gen_op(H);
  }
gen_op HQw ( const solid_sys & sys ) { int ns = sys . spins ( ) ; std :: vector < int > HSs = sys . HSvect ( ) ; double Om ; matrix H ; IntQuad Q ; for ( int i = 0 ; i < ns ; i ++ ) { Q = sys . getQuadInt ( i ) ; Om = sys . Omega ( i ) * 1.e6 ; H += Q . Hw ( HSs , i , Om ) ; } return gen_op ( H ) ; }
These are SECULAR (Rotationally Invariant About Bo Field Axis)
Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman
These are SECULAR ( Rotationally Invariant About Bo Field Axis ) Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman
// Number of spins // Array of spin Hilbert spaces // Spin Larmour frequency // Hamiltonian matrix // Quadrupolar interaction // Loop over all spins //   Get quadrupolar interact. //   Get Larmor frequency (Hz) //   Add spin pair H component