src/HSLib/GenOp.cc
// Input                Op     : General operator (this)
// Output               vect   : Vector of aligned Op elements
// Note 		       : Added in support of multi-sys
Input                Op     : General operator (this)
Output               vect   : Vector of aligned Op elements
Note                  : Added in support of multi-sys
Input Op : General operator ( this ) Output vect : Vector of aligned Op elements Note : Added in support of multi - sys
col_vector gen_op::superket() const
  {
  basis bs = (*this).get_basis();
  matrix mx = (*this).get_mx();
  int dimS = bs.dim_LS();
  col_vector mS(dimS);
  int mSptr=0, pinblock, j, k;
  complex elt;
  for(int i=0; i<bs.sub_N(); i++)
    {
    pinblock = bs.sub_anchor(i);
    for(j=pinblock; j<pinblock+bs.sub_dim(i); j++)
      for(k=pinblock; k<pinblock+bs.sub_dim(i); k++)
        {
        elt = mx.get(j,k);
        mS.put(elt, mSptr);
	mSptr++;
	}	
     }
  return mS;
  }
col_vector gen_op :: superket ( ) const { basis bs = ( * this ) . get_basis ( ) ; matrix mx = ( * this ) . get_mx ( ) ; int dimS = bs . dim_LS ( ) ; col_vector mS ( dimS ) ; int mSptr = 0 , pinblock , j , k ; complex elt ; for ( int i = 0 ; i < bs . sub_N ( ) ; i ++ ) { pinblock = bs . sub_anchor ( i ) ; for ( j = pinblock ; j < pinblock + bs . sub_dim ( i ) ; j ++ ) for ( k = pinblock ; k < pinblock + bs . sub_dim ( i ) ; k ++ ) { elt = mx . get ( j , k ) ; mS . put ( elt , mSptr ) ; mSptr ++ ; } } return mS ; }
Input                Op     : General operator (this)
Output               vect   : Vector of aligned Op elements
Note                  : Added in support of multi-sys
Input Op : General operator ( this ) Output vect : Vector of aligned Op elements Note : Added in support of multi - sys