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};
h=sym('h');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%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;
H=(h^2/4)*(s1.s2);

[evec,eval]=eig(H);




