Skip to content

Offset support in Wigner and other visualizations #1417

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

Open
Krastanov opened this issue Jan 18, 2021 · 6 comments
Open

Offset support in Wigner and other visualizations #1417

Krastanov opened this issue Jan 18, 2021 · 6 comments

Comments

@Krastanov
Copy link
Contributor

Is your feature request related to a problem? Please describe.
For coherent states of large average photon number it is convenient to use the offset parameter as in http://qutip.org/docs/latest/apidoc/functions.html?highlight=wigner#qutip.states.coherent

However, wigner and others do not support that parameter and would just give wrong results.

Describe the solution you'd like
Functions like http://qutip.org/docs/latest/apidoc/functions.html?highlight=wigner#qutip.wigner.wigner , http://qutip.org/docs/latest/apidoc/functions.html?highlight=wigner#qutip.visualization.plot_wigner_fock_distribution , and others could support an offset parameter or the offset parameter can be stored in the qobject.

Describe alternatives you've considered
Calculating these functions manually. It works but it is pretty annoying.

@lambaaryan011
Copy link

Hi @Krastanov still this issue in the working period ?

@Ericgig
Copy link
Member

Ericgig commented Feb 7, 2025

This issue still hasn't been fixed.
We are open for contribution.

@lambaaryan011
Copy link

Hey @Ericgig could you please assign this issue to me? I'd love to take it on!

@Ericgig
Copy link
Member

Ericgig commented Feb 7, 2025

We don't really assign issue, just make a PR.
It's been open for a few years, there should not have much conflict.

@lambaaryan011
Copy link

Hey @Ericgig, I’m having trouble locating these two functions: qutip.wigner.wigner and qutip.visualization.plot_wigner_fock_distribution. Could you point me to the right folder? I know how to solve this once I find them.

@Ericgig
Copy link
Member

Ericgig commented Feb 10, 2025

plot_wigner_fock_distribution does not exist anymore, it was replaced with plot_wigner and plot_fock_distribution.
wigner is still as is,.
They are in the "qutip" folder... just search for them in your editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants