Code covered by the BSD License  

Highlights from
QUBIT4MATLAB V4.0

from QUBIT4MATLAB V4.0 by Geza Toth
MATLAB package for quantum information science and quantum mechanics.

coeff=schmidt(state,list)
% schmidt   Schmidt coefficients of a pure state.
%   Used in the form schmidt(state,list) where state is
%   a state vector and list is a list of qubits in order to
%   define bi-partitioning. Qubit numbering is the same as 
%   in the case of the function remove.

function coeff=schmidt(state,list)
coeff=sqrt(real(eig(remove(ketbra(state),list))));

Contact us at files@mathworks.com