10.02.2013 Views

Diploma thesis

Diploma thesis

Diploma thesis

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

�� compute the Schmidt eigenmatrix �i.e., the matrix which is used to compute the eigenvalues<br />

schmidtEM�F�, s�� :� Chop�Table�Sum�F��i,n���Conjugate�F��j,n���, �n,1,s��, �i,1,s�, �j,1,s��<br />

�� Compute the l’th �zero based� Schmidt function for overlap matrix F.<br />

s denotes the maximal number of basis functions. ��<br />

schmidtFnOne�F�, s�, l�, x�� :� schmidtFnOne�F, s, l, x� � Module��K,v,e�,<br />

K � schmidtEM�F,s�;<br />

v �Chop�Eigenvectors�K���l�1���;<br />

Return�Sum�v��m���normH�m�1,x�, �m,1,s���;<br />

�;<br />

schmidtFnTwo�F�, s�, l�, x�� :� schmidtFnTwo�F, s, l, x� � Module��K,v,e�,<br />

K �schmidtEM�F,s�;<br />

v �Chop�Eigenvectors�K���l�1���;<br />

e � Eigenvalues�K�;<br />

Return�1�Sqrt�e��l�1����Sum�Conjugate�v��m����F��m,n���normH�n�1,x�, �m,1,s�, �n,1,s���;<br />

�;<br />

�� Here s denotes how many elements of the old basis are used to compute the new basis, i.e.<br />

old basis functions a Schmidt basis function is composed of.<br />

d tells how many of the new basis functions will be used, i.e., how many Schmidt terms are used<br />

schmidtFn�F�, s�, d�, x�, y�� :� schmidtFn�F,s,d,x,y� � Module��K�,<br />

Return�Simplify�Sum�Sqrt�schmidtEigenval�F,s���n�1����schmidtFnOne�F,s,n,x��schmidtFnTwo�F,s,<br />

�;<br />

�� Return the eigenvalues used to construct the Schmidt basis.<br />

This measures how entangled the state is since the quantity is<br />

invariant under basis transforms. Note that the number of basis elements<br />

does not in the least imply anything about the basis dimension. ��<br />

schmidtEigenval�F�, s�� :� Module��K�,<br />

K � Chop�Table�Sum�F��i,n���Conjugate�F��j,n���, �n,1,s��, �i,1,s�, �j,1,s���;<br />

Return�Chop�Eigenvalues�K���;<br />

�;<br />

�� Distance measures between two functions f and g.<br />

TODO: Adapt this to variable function domains, not only ��3,3�. ��<br />

dist�f�, g�� :� NIntegrate�Abs�f�x,y� � g�x,y��^2, �x,�3,3�, �y,�3,3�,AccuracyGoal��4�;<br />

distEV�f�,e�� :� 1��Sum�e��n��,�n,1,Length�e�����NIntegrate�Conjugate�f�x,y���f�x,y�, �x,�3,3<br />

�� Some call it Shannon Entropy, others call it entropy of entanglement ��<br />

S�l�� :� �Sum�l��n���Log�2,l��n���, �n,1,Length�l���;<br />

Entanglement�F�, s�� :� S�Eigenvalues�Table�Sum�F��i,n���Conjugate�F��j,n���, �n,1,s��, �i,1,<br />

�� f is the function in the new polynomial basis ��not� the Schmidt basis��. T is the overlap<br />

matrix, k denotes which order to use. ��<br />

doSum�x�, y�,T�,k�� :� doSum�x,y,T,k�� Simplify�Sum�T��m,n���normH�m�1,x��normH�n�1,y�, �m,1,<br />

f�x�, y�,T�,k�� :� doSum�x,y, T,k�;<br />

�� Some sample functions. Gauss is, well, a Gau ian distribution, while shiftedGauss contains<br />

gauss�x�, y�� :� gauss�x,y� � 1��2�Pi��Exp��0.5x^2�0.5y^2�;<br />

gaussShifted�x�, y�� :� gaussShifted�x,y� � 1��2�Pi��Exp��0.5�x�1�^2�0.5�y�1�^2��1��2�Pi��Exp<br />

�� TODO: Allow optional arguments be passed on to overlap ��<br />

�� This computes a size x size overlap table for a given function ��<br />

overlapTable�func�, size�� :� overlapTable�func, size� � Table�m,n,func, �m,0,size,1�, �n,0,size<br />

EndPackage��<br />

wmschmidt.m 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!