-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining Wigner for particle bases #420
Comments
A starting point can be function mywigner(psi)
map(Iterators.product(samplepoints(psi.basis), samplepoints(MomentumBasis(psi.basis)))) do (x, p)
xmax = psi.basis.xmax
xmin = psi.basis.xmin
N = psi.basis.N
dy = (xmax - xmin)/N
getloc(x) = round(Int, (x - xmin)/N) + 1
ys = collect(filter(y->(xmin<x+y<xmax)&&(xmin<x-y<xmax), samplepoints(psi.basis)))
1/(π*ħ) * sum(ys, init=0) do y
conj(psi[getloc(x+y)]) * psi[getloc(x-y)] * cis(2*p*y/ħ) * dy
end
end
end However, a better approach may be to actually perform a FT instead of running a sum |
Starting with a simple implementation is perfectly reasonable. If you have the time, please submit a PR and the rest of us will try to help with review. |
FYI, there is already a |
This would probably not be ideal since there are approximation steps (an upper limit to n) at each representation. This is probably also why this is not default behavior? I may however be wrong, so please take with salt. |
Well that cutoff (and potentially offset) should essentially just be the same as the |
Given a state in the position/momentum bases, we can calulcate the wigner function as (black text)
as defined in wiki.
We should implement this function for states on the particle bases.
The text was updated successfully, but these errors were encountered: