gusucode.com > qit_matlab_0.10.0工具箱源码程序 > qit/utils/lrmul.m

    function S = lrmul(L, R)
% LRMUL  Superoperator equivalent for multiplying both from left and right.
%  S = lrmul(L, R);
%
%  L*rho*R == inv_vec(lrmul(L, R)*vec(rho))

% Ville Bergholm 2009-2013


% L and R fix the shape of rho completely
S = kron(R.', L);