Created
June 27, 2017 21:44
-
-
Save johnrichardrinehart/8dc91b638627d26fa6d9e30e40feb0d1 to your computer and use it in GitHub Desktop.
A plot of a cat state |3> + |-3> for PHYS776 (Resch, Spring 2017) - Assignment 2, Problem 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Plots | |
Plots.plotly() | |
function f(B) | |
return function (a,b) | |
(2/pi)*( | |
2*e^(-2*(a^2+b^2))*cos(4*b*B) | |
+ | |
e^(-2*((a+B)^2+b^2))*(1+e^(8*a*B)) | |
) | |
end | |
end | |
x = y = -4:1e-1:4 | |
Plots.plot(x,y,f(3),linetype=:surface) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment