Skip to content
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

Discrepency between wigner_discretized and the actual Wigner function. #483

Open
1 task done
arsalan-motamedi opened this issue Sep 4, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@arsalan-motamedi
Copy link
Collaborator

Before posting a bug report

  • I have searched exisisting GitHub issues to make sure the issue does not already exist.

Expected behavior

Sending a phi squeezed state, we get a phi+pi squeezed one with wigner_discretized. As an example:
`settings.HBAR=2
state = DisplacedSqueezed([0], r=0.5, phi=0.0, x=1.0, y=0.0)

state2 = DisplacedSqueezed([0], r=0.5, phi=np.pi, x=0.0, y=1.0)
dm = math.sum(state2.to_fock(100).dm().representation.array, axes=[0])
xvec = np.linspace(-5, 5, 100)
pvec = np.linspace(-5, 5, 100)
wigner, _, _ = wigner_discretized(dm, xvec, pvec)

Wigner = (state >> CFT([0]) >> BtoPS([0], s=0)).representation.ansatz
X, Y = np.meshgrid(xvec, pvec)
Z = np.array([X - 1j * Y, X + 1j * Y]).transpose((1, 2, 0))`

Actual behavior

Explained above.

Reproduces how often

NA

System information

NA

Source code

No response

Tracebacks

No response

Additional information

No response

@arsalan-motamedi arsalan-motamedi added the bug Something isn't working label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant