src/HSLib/GenOp.cc
// Input		: Operator (this) with preserved basis
//			  structure
//			: Superket that had been formed from Op
// Output		: General Operator (this) with updated mx
// Note 		       : Added in support of multi-sys
Input          : Operator (this) with preserved basis
structure
: Superket that had been formed from Op
Output         : General Operator (this) with updated mx
Note                  : Added in support of multi-sys
Input : Operator ( this ) with preserved basis structure : Superket that had been formed from Op Output : General Operator ( this ) with updated mx Note : Added in support of multi - sys
void gen_op::desuperket(const col_vector& mS)
  {
  basis bs=(*this).get_basis();
  matrix mX=(*this).get_mx();
  int mSptr=0, pinblock, i, j, k;
  complex elt;
  for (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 = mS.get(mSptr);
            mX.put(elt,j,k);
            mSptr++;
          }
     }
  setOnlyWBR ();
  (*this).put_mx(mX);
  }
void gen_op :: desuperket ( const col_vector & mS ) { basis bs = ( * this ) . get_basis ( ) ; matrix mX = ( * this ) . get_mx ( ) ; int mSptr = 0 , pinblock , i , j , k ; complex elt ; for ( 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 = mS . get ( mSptr ) ; mX . put ( elt , j , k ) ; mSptr ++ ; } } setOnlyWBR ( ) ; ( * this ) . put_mx ( mX ) ; }
Input          : Operator (this) with preserved basis
structure
: Superket that had been formed from Op
Output         : General Operator (this) with updated mx
Note                  : Added in support of multi-sys
Input : Operator ( this ) with preserved basis structure : Superket that had been formed from Op Output : General Operator ( this ) with updated mx Note : Added in support of multi - sys