src/MultiSys/MultiLOp.cc
// Input	H 	: A operator
// Output	LOp     : A superoperator which will
//			  diagonalize H
Input  H       : A operator
Output LOp     : A superoperator which will
diagonalize H
Input H : A operator Output LOp : A superoperator which will diagonalize H
super_op U_LS(gen_op& H)
  {
  basis bs = H.get_basis();			
  int nc = bs.sub_N();				
  matrix *mxc;				
  mxc = new matrix[nc];
  gen_op Op, op_U;
  matrix mx_sys;
  super_op sop_U; 
  for(int i=0; i<nc; i++)			
    {
    Op = H.project_sub(i);			
    Op.set_EBR();				
    mx_sys = (Op.get_basis()).U();
    op_U = gen_op(mx_sys);  
    sop_U = U_transform(op_U);			
    mxc[i] = sop_U.get_mx();
    }
  super_op LOp(mxc, nc);			
  delete [] mxc;
  return LOp;
  }
super_op U_LS ( gen_op & H ) { basis bs = H . get_basis ( ) ; int nc = bs . sub_N ( ) ; matrix * mxc ; mxc = new matrix [ nc ] ; gen_op Op , op_U ; matrix mx_sys ; super_op sop_U ; for ( int i = 0 ; i < nc ; i ++ ) { Op = H . project_sub ( i ) ; Op . set_EBR ( ) ; mx_sys = ( Op . get_basis ( ) ) . U ( ) ; op_U = gen_op ( mx_sys ) ; sop_U = U_transform ( op_U ) ; mxc [ i ] = sop_U . get_mx ( ) ; } super_op LOp ( mxc , nc ) ; delete [ ] mxc ; return LOp ; }
Input  H       : A operator
Output LOp     : A superoperator which will
diagonalize H
Input H : A operator Output LOp : A superoperator which will diagonalize H
// Get H's basis  // Number of subspaces // Storage for subspace arrays // Loop over all components // H's ith comp. (ith subspace) // Set H's ith comp. in eigenbasis //    mx_sys = (const matrix&)Op.get_basis(); // That's U x U // implies default basis