Matrix form for creation and annihilation operator with spins.
조회 수: 16 (최근 30일)
이전 댓글 표시
This might be little geared towards physics but if anyone can help, it would so much helpful for me. So basically I want the matrix form of the following Hamiltonian
., where
creates an electron at site i with spin σ which can be up (↑) or down (↓). For this I need the matrix form of the operators involved. For people who have been working with this type of Hamiltonian are aware that it follows aniti-commutation relations ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741309/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741299/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741304/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741309/image.png)
What I can do now is that I can write the operators without the spin as below but i need help with the above when spin is also involved.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741314/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741319/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/741324/image.png)
N = 4;
%n = 1:N;
a = diag(sqrt(1:N),1)% Creates matrix with elements of the vector on first super diagonal(i.e 1)
ad = a' %adagger
Is there anyway to do that. How should I go on to create the Hamiltonian for that. Are there any helpful packages to do that. Any help would be appreciated.
Thank you.
댓글 수: 0
답변 (2개)
Matt J
2021년 9월 17일
편집: Matt J
2021년 9월 17일
Not sure this will help, but if you can write a function that implements the operator, then his File Exchange offering,
will convert it to matrix form. For example,
fn=@(x) 7*x(1:3)-3*x(4:6); %A function, doesn't have to be anonymous
A=func2mat(fn, ones(6,1));
full(A)
댓글 수: 0
Marc
2023년 4월 3일
편집: Marc
2023년 4월 5일
Im sure this comes too late but in case someone else has this question aswell (I know I did) I will try to answer it.
Unlike bosons, the Hilbert space for spins is finite dimensional and if you work with states
all you require is a 2x2 matrix:
={0 1; 0 0}. The spin algebra for N spins follows using only the kron product that exists in default MATLAB.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1343879/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1343884/image.png)
For example, for 2 spins we can define spin lowering (raising) opeartors on each site through
. On MATLAB we can define a global spin operator S and then act on it with the kron product to divide the Hilbert space into the 2 distinct spin subspaces:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1343889/image.png)
S = diag(1,1); Sd = S'; %local spin lowering and raising operator
sigma1=kron(S,I); sigma1d=sigma1'; %spin operator on site 1, identity of site 2
sigma2=kron(I,S); sigma2d=sigma2'; %identity of site 1, spin operator on site 2
You can immediately extend this to N spins by iterating this process with the usual tensor product identities, namely for site
:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1344034/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1344029/image.png)
You can check the spin algebra is satisfied in the 2-spin state above by simply calculating the anticommutators
sigma1d*sigma2d+sigma2d*sigma1d; sigma1*sigma2+sigma2*sigma1; sigma1d*sigma2+sigma2*sigma1d
which should yield zeroes for the diagonals and a kronecker delta for the cross terms.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!