global hadamard cnot cphase sx sy sz rx ry rz N zz xx yy

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%pauli matrices

sx=[0 1; 1 0];
sy=[0 -i; i 0];
sz=[1 0; 0 -1];
si=[1 0; 0 1];

pauli={sx,sy,sz};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%two-qubit interaction terms: product space

zz=kron(sz,sz);
xx=kron(sx,sx);
yy=kron(sy,sy);
zi=kron(sz,si);
iz=kron(si,sz);
ii=kron(si,si);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Test to see if this works for two spin 1/2 particles
%Evec are the eigenvectors and eval are the eigenvalues

s1.s2=xx+yy+zz;
[evec,eval]=eig(s1.s2);




