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.

U=U_CNOT
% U_CNOT   4x4 unitary matrix realizing a CNOT gate
function U=U_CNOT

U=[1 0 0 0;0 1 0 0;0 0 0 1;0 0 1 0];

Contact us at files@mathworks.com