Skip to content

Discrepency between wigner_discretized and the actual Wigner function. #483

@arsalan-motamedi

Description

@arsalan-motamedi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions