src/IntRank2/HQuadrup.cc
/*       These are SECULAR (Rotationally Invariant About Bo Field Axis)
    Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman

   As mentioned in section A, the quadrupolar Hamiltonian is not rotationally
   invariant about the z-axis. In that section we simply ignored all terms
   which are time dependent in the rotating frame. In thise section we build
   Hamiltonians that compensate for the neglect of such terms while still 
   allowing one to express the Hamiltonian in a rotating frame.

   In more explicit mathematical terms, the Hamiltonian returned in this
   section is given by
 
    [2]              -1   [ Xi ]2 [                           2    2   
   H   (theta,phi) = -- * | -- |  | 2*A A  (theta,phi)*I *(4*I - 8I  - 1)
    Q                Om   [ 2  ]  [    1 -1             z          z
                           
                                                                2    2      ]
                                    + 2*A A  (theta,phi)*I *(2*I - 2I  - 1) |
                                         2 -2             z          z      ]

   Note that this term will need to be added to the 1st order quadrupolar
   Hamiltonian (as well as the Zeeman Hamiltonian) in order to produce something
   that will be useful in affecting a system.

           Input                sys     : Spin system
           Output               H1	: The 2nd order secular part of the
                                          quadrupolar Hamiltonian (default
                                          basis, Hz) for the interaction
           Note				: Also called the 1st order quadrupolar
                                          interaction (perturbation theory)
	   Note 			: This will be zero in PAS if no eta
	  				  and small if Om >> QCC, i.e. when
					  Zeeman >> Quadrupolar!             */
These are SECULAR (Rotationally Invariant About Bo Field Axis)
Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman

As mentioned in section A, the quadrupolar Hamiltonian is not rotationally
invariant about the z-axis. In that section we simply ignored all terms
which are time dependent in the rotating frame. In thise section we build
Hamiltonians that compensate for the neglect of such terms while still
allowing one to express the Hamiltonian in a rotating frame.

In more explicit mathematical terms, the Hamiltonian returned in this
section is given by





Note that this term will need to be added to the 1st order quadrupolar
Hamiltonian (as well as the Zeeman Hamiltonian) in order to produce something
that will be useful in affecting a system.

Input                sys     : Spin system
Output               H1      : The 2nd order secular part of the
quadrupolar Hamiltonian (default
basis, Hz) for the interaction
Note                         : Also called the 1st order quadrupolar
interaction (perturbation theory)
Note                         : This will be zero in PAS if no eta
and small if Om >> QCC, i.e. when
Zeeman >> Quadrupolar!
These are SECULAR ( Rotationally Invariant About Bo Field Axis ) Applicable When The Quadrupolar Interaction Is A Perturbation To Zeeman As mentioned in section A the quadrupolar Hamiltonian is not rotationally invariant about the z - axis . In that section we simply ignored all terms which are time dependent in the rotating frame . In thise section we build Hamiltonians that compensate for the neglect of such terms while still allowing one to express the Hamiltonian in a rotating frame . In more explicit mathematical terms the Hamiltonian returned in this section is given by Note that this term will need to be added to the 1st order quadrupolar Hamiltonian ( as well as the Zeeman Hamiltonian ) in order to produce something that will be useful in affecting a system . Input sys : Spin system Output H1 : The 2nd order secular part of the quadrupolar Hamiltonian ( default basis Hz ) for the interaction Note : Also called the 1st order quadrupolar interaction ( perturbation theory ) Note : This will be zero in PAS if no eta and small if Om >> QCC i . e . when Zeeman >> Quadrupolar!
gen_op HQ1(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.H1(HSs, i, Om);			
    }
  return gen_op(H);
  }
gen_op HQ1 ( 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 . H1 ( 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