src/IntRank2/HQuadrup.cc
/*                 These Hamiltonians Assume No Approximations 
       They Are Independent Of The Strength Of Any Externally Applied Field
         They Are Correct In The Laboratory Frame, NOT In A Rotating Frame

                                 spins
                                  --- 
                            H   = \   H (theta , phi )
                             Q    /    Q      i     i
                                  --- 
                                   i

                              Q       m    Q                   Q
          H (theta ,phi ) = Xi  * (-1)  * A   (theta ,phi ) * T    (i)
           Q      i    i      i            2,m      i    i     2,-m   
 
           Input                sys  : Spin system
	   Note				: This will return in the spin
	  				  Hilbert space of spin system       */
These Hamiltonians Assume No Approximations
They Are Independent Of The Strength Of Any Externally Applied Field
They Are Correct In The Laboratory Frame, NOT In A Rotating Frame

spins

H   = \   H (theta , phi )
Q    /    Q      i     i

i



Input                sys  : Spin system
Note                         : This will return in the spin
Hilbert space of spin system
These Hamiltonians Assume No Approximations They Are Independent Of The Strength Of Any Externally Applied Field They Are Correct In The Laboratory Frame NOT In A Rotating Frame spins H = \ H ( theta phi ) Q / Q i i i Input sys : Spin system Note : This will return in the spin Hilbert space of spin system
gen_op HQ(const solid_sys& sys)
  {
  int ns = sys.spins();                         
  std::vector<int> HSs = sys.HSvect();               
  matrix H;                                     
  IntQuad Q;                                    
  for(int i=0; i<ns; i++)                       
    {
    Q  = sys.getQuadInt(i);			
    H += Q.H(HSs, i);				
    }
  return gen_op(H);
  }
gen_op HQ ( const solid_sys & sys ) { int ns = sys . spins ( ) ; std :: vector < int > HSs = sys . HSvect ( ) ; matrix H ; IntQuad Q ; for ( int i = 0 ; i < ns ; i ++ ) { Q = sys . getQuadInt ( i ) ; H += Q . H ( HSs , i ) ; } return gen_op ( H ) ; }
These Hamiltonians Assume No Approximations
They Are Independent Of The Strength Of Any Externally Applied Field
They Are Correct In The Laboratory Frame, NOT In A Rotating Frame
These Hamiltonians Assume No Approximations They Are Independent Of The Strength Of Any Externally Applied Field They Are Correct In The Laboratory Frame NOT In A Rotating Frame
// Number of spins // Array of spin Hilbert spaces // Hamiltonian matrix // Quadrupolar interaction // Loop over all spins //   Get quadrupolar interact. //   Add spin pair H component