{"action":"opened","number":461,"pull_request":{"url":"https://api.github.com/repos/qutip/qutip/pulls/461","id":65525362,"html_url":"https://github.com/qutip/qutip/pull/461","diff_url":"https://github.com/qutip/qutip/pull/461.diff","patch_url":"https://github.com/qutip/qutip/pull/461.patch","issue_url":"https://api.github.com/repos/qutip/qutip/issues/461","number":461,"state":"open","locked":false,"title":"Correct way of calculating Wigner function","user":{"login":"Vutshi","id":4971779,"avatar_url":"https://avatars.githubusercontent.com/u/4971779?v=3","gravatar_id":"","url":"https://api.github.com/users/Vutshi","html_url":"https://github.com/Vutshi","followers_url":"https://api.github.com/users/Vutshi/followers","following_url":"https://api.github.com/users/Vutshi/following{/other_user}","gists_url":"https://api.github.com/users/Vutshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Vutshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vutshi/subscriptions","organizations_url":"https://api.github.com/users/Vutshi/orgs","repos_url":"https://api.github.com/users/Vutshi/repos","events_url":"https://api.github.com/users/Vutshi/events{/privacy}","received_events_url":"https://api.github.com/users/Vutshi/received_events","type":"User","site_admin":false},"body":"A new iterative method using Clenshaw summation is implemented. It is numerically stable and fast (2-3 times faster than 'iterative').\r\n\r\nTest:\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nfrom qutip import *\r\nimport numpy as np\r\n\r\nxvec=np.linspace(-10,10,101);yvec=xvec;X,Y = np.meshgrid(xvec, yvec)\r\npsi=coherent(100,7.3*np.exp(1j*0.5))\r\nrho0 = ket2dm(psi)\r\nWW = wigner(rho0,xvec,yvec,method='iterative')\r\nWWc = wigner(rho0,xvec,yvec,method='clenshaw')\r\n\r\nplt.contourf(X,Y,WW,100,cmap=plt.cm.viridis)\r\nplt.show()\r\nplt.contourf(X,Y,WWc,100,cmap=plt.cm.viridis)\r\nplt.show()\r\n```","created_at":"2016-04-06T19:51:11Z","updated_at":"2016-04-06T19:51:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qutip/qutip/pulls/461/commits","review_comments_url":"https://api.github.com/repos/qutip/qutip/pulls/461/comments","review_comment_url":"https://api.github.com/repos/qutip/qutip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qutip/qutip/issues/461/comments","statuses_url":"https://api.github.com/repos/qutip/qutip/statuses/86069c70220a727ec009b6774f35cdf38ff61409","head":{"label":"Vutshi:patch-1","ref":"patch-1","sha":"86069c70220a727ec009b6774f35cdf38ff61409","user":{"login":"Vutshi","id":4971779,"avatar_url":"https://avatars.githubusercontent.com/u/4971779?v=3","gravatar_id":"","url":"https://api.github.com/users/Vutshi","html_url":"https://github.com/Vutshi","followers_url":"https://api.github.com/users/Vutshi/followers","following_url":"https://api.github.com/users/Vutshi/following{/other_user}","gists_url":"https://api.github.com/users/Vutshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Vutshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vutshi/subscriptions","organizations_url":"https://api.github.com/users/Vutshi/orgs","repos_url":"https://api.github.com/users/Vutshi/repos","events_url":"https://api.github.com/users/Vutshi/events{/privacy}","received_events_url":"https://api.github.com/users/Vutshi/received_events","type":"User","site_admin":false},"repo":{"id":12134443,"name":"qutip","full_name":"Vutshi/qutip","owner":{"login":"Vutshi","id":4971779,"avatar_url":"https://avatars.githubusercontent.com/u/4971779?v=3","gravatar_id":"","url":"https://api.github.com/users/Vutshi","html_url":"https://github.com/Vutshi","followers_url":"https://api.github.com/users/Vutshi/followers","following_url":"https://api.github.com/users/Vutshi/following{/other_user}","gists_url":"https://api.github.com/users/Vutshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Vutshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vutshi/subscriptions","organizations_url":"https://api.github.com/users/Vutshi/orgs","repos_url":"https://api.github.com/users/Vutshi/repos","events_url":"https://api.github.com/users/Vutshi/events{/privacy}","received_events_url":"https://api.github.com/users/Vutshi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vutshi/qutip","description":"QuTiP: Quantum Toolbox in Python","fork":true,"url":"https://api.github.com/repos/Vutshi/qutip","forks_url":"https://api.github.com/repos/Vutshi/qutip/forks","keys_url":"https://api.github.com/repos/Vutshi/qutip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vutshi/qutip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vutshi/qutip/teams","hooks_url":"https://api.github.com/repos/Vutshi/qutip/hooks","issue_events_url":"https://api.github.com/repos/Vutshi/qutip/issues/events{/number}","events_url":"https://api.github.com/repos/Vutshi/qutip/events","assignees_url":"https://api.github.com/repos/Vutshi/qutip/assignees{/user}","branches_url":"https://api.github.com/repos/Vutshi/qutip/branches{/branch}","tags_url":"https://api.github.com/repos/Vutshi/qutip/tags","blobs_url":"https://api.github.com/repos/Vutshi/qutip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vutshi/qutip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vutshi/qutip/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vutshi/qutip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vutshi/qutip/statuses/{sha}","languages_url":"https://api.github.com/repos/Vutshi/qutip/languages","stargazers_url":"https://api.github.com/repos/Vutshi/qutip/stargazers","contributors_url":"https://api.github.com/repos/Vutshi/qutip/contributors","subscribers_url":"https://api.github.com/repos/Vutshi/qutip/subscribers","subscription_url":"https://api.github.com/repos/Vutshi/qutip/subscription","commits_url":"https://api.github.com/repos/Vutshi/qutip/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vutshi/qutip/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vutshi/qutip/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vutshi/qutip/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vutshi/qutip/contents/{+path}","compare_url":"https://api.github.com/repos/Vutshi/qutip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vutshi/qutip/merges","archive_url":"https://api.github.com/repos/Vutshi/qutip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vutshi/qutip/downloads","issues_url":"https://api.github.com/repos/Vutshi/qutip/issues{/number}","pulls_url":"https://api.github.com/repos/Vutshi/qutip/pulls{/number}","milestones_url":"https://api.github.com/repos/Vutshi/qutip/milestones{/number}","notifications_url":"https://api.github.com/repos/Vutshi/qutip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vutshi/qutip/labels{/name}","releases_url":"https://api.github.com/repos/Vutshi/qutip/releases{/id}","deployments_url":"https://api.github.com/repos/Vutshi/qutip/deployments","created_at":"2013-08-15T13:02:11Z","updated_at":"2013-10-14T09:06:56Z","pushed_at":"2016-04-06T19:47:41Z","git_url":"git://github.com/Vutshi/qutip.git","ssh_url":"git@github.com:Vutshi/qutip.git","clone_url":"https://github.com/Vutshi/qutip.git","svn_url":"https://github.com/Vutshi/qutip","homepage":null,"size":17288,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qutip:master","ref":"master","sha":"e32680ae94343a691dec1c16cd12190900fef620","user":{"login":"qutip","id":2517630,"avatar_url":"https://avatars.githubusercontent.com/u/2517630?v=3","gravatar_id":"","url":"https://api.github.com/users/qutip","html_url":"https://github.com/qutip","followers_url":"https://api.github.com/users/qutip/followers","following_url":"https://api.github.com/users/qutip/following{/other_user}","gists_url":"https://api.github.com/users/qutip/gists{/gist_id}","starred_url":"https://api.github.com/users/qutip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qutip/subscriptions","organizations_url":"https://api.github.com/users/qutip/orgs","repos_url":"https://api.github.com/users/qutip/repos","events_url":"https://api.github.com/users/qutip/events{/privacy}","received_events_url":"https://api.github.com/users/qutip/received_events","type":"Organization","site_admin":false},"repo":{"id":6136261,"name":"qutip","full_name":"qutip/qutip","owner":{"login":"qutip","id":2517630,"avatar_url":"https://avatars.githubusercontent.com/u/2517630?v=3","gravatar_id":"","url":"https://api.github.com/users/qutip","html_url":"https://github.com/qutip","followers_url":"https://api.github.com/users/qutip/followers","following_url":"https://api.github.com/users/qutip/following{/other_user}","gists_url":"https://api.github.com/users/qutip/gists{/gist_id}","starred_url":"https://api.github.com/users/qutip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qutip/subscriptions","organizations_url":"https://api.github.com/users/qutip/orgs","repos_url":"https://api.github.com/users/qutip/repos","events_url":"https://api.github.com/users/qutip/events{/privacy}","received_events_url":"https://api.github.com/users/qutip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qutip/qutip","description":"QuTiP: Quantum Toolbox in Python","fork":false,"url":"https://api.github.com/repos/qutip/qutip","forks_url":"https://api.github.com/repos/qutip/qutip/forks","keys_url":"https://api.github.com/repos/qutip/qutip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qutip/qutip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qutip/qutip/teams","hooks_url":"https://api.github.com/repos/qutip/qutip/hooks","issue_events_url":"https://api.github.com/repos/qutip/qutip/issues/events{/number}","events_url":"https://api.github.com/repos/qutip/qutip/events","assignees_url":"https://api.github.com/repos/qutip/qutip/assignees{/user}","branches_url":"https://api.github.com/repos/qutip/qutip/branches{/branch}","tags_url":"https://api.github.com/repos/qutip/qutip/tags","blobs_url":"https://api.github.com/repos/qutip/qutip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qutip/qutip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qutip/qutip/git/refs{/sha}","trees_url":"https://api.github.com/repos/qutip/qutip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qutip/qutip/statuses/{sha}","languages_url":"https://api.github.com/repos/qutip/qutip/languages","stargazers_url":"https://api.github.com/repos/qutip/qutip/stargazers","contributors_url":"https://api.github.com/repos/qutip/qutip/contributors","subscribers_url":"https://api.github.com/repos/qutip/qutip/subscribers","subscription_url":"https://api.github.com/repos/qutip/qutip/subscription","commits_url":"https://api.github.com/repos/qutip/qutip/commits{/sha}","git_commits_url":"https://api.github.com/repos/qutip/qutip/git/commits{/sha}","comments_url":"https://api.github.com/repos/qutip/qutip/comments{/number}","issue_comment_url":"https://api.github.com/repos/qutip/qutip/issues/comments{/number}","contents_url":"https://api.github.com/repos/qutip/qutip/contents/{+path}","compare_url":"https://api.github.com/repos/qutip/qutip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qutip/qutip/merges","archive_url":"https://api.github.com/repos/qutip/qutip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qutip/qutip/downloads","issues_url":"https://api.github.com/repos/qutip/qutip/issues{/number}","pulls_url":"https://api.github.com/repos/qutip/qutip/pulls{/number}","milestones_url":"https://api.github.com/repos/qutip/qutip/milestones{/number}","notifications_url":"https://api.github.com/repos/qutip/qutip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qutip/qutip/labels{/name}","releases_url":"https://api.github.com/repos/qutip/qutip/releases{/id}","deployments_url":"https://api.github.com/repos/qutip/qutip/deployments","created_at":"2012-10-09T06:20:46Z","updated_at":"2016-03-31T14:01:50Z","pushed_at":"2016-04-05T04:15:00Z","git_url":"git://github.com/qutip/qutip.git","ssh_url":"git@github.com:qutip/qutip.git","clone_url":"https://github.com/qutip/qutip.git","svn_url":"https://github.com/qutip/qutip","homepage":null,"size":17978,"stargazers_count":155,"watchers_count":155,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":34,"forks":87,"open_issues":34,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qutip/qutip/pulls/461"},"html":{"href":"https://github.com/qutip/qutip/pull/461"},"issue":{"href":"https://api.github.com/repos/qutip/qutip/issues/461"},"comments":{"href":"https://api.github.com/repos/qutip/qutip/issues/461/comments"},"review_comments":{"href":"https://api.github.com/repos/qutip/qutip/pulls/461/comments"},"review_comment":{"href":"https://api.github.com/repos/qutip/qutip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qutip/qutip/pulls/461/commits"},"statuses":{"href":"https://api.github.com/repos/qutip/qutip/statuses/86069c70220a727ec009b6774f35cdf38ff61409"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":71,"deletions":4,"changed_files":1}}