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

Diverging default colorscale for wigner function plots #418

Closed
1 task done
JacobHast opened this issue Jun 18, 2024 · 0 comments · Fixed by #450
Closed
1 task done

Diverging default colorscale for wigner function plots #418

JacobHast opened this issue Jun 18, 2024 · 0 comments · Fixed by #450
Assignees
Labels
enhancement New feature or request

Comments

@JacobHast
Copy link
Contributor

Before posting a feature request

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

Feature details

For showing Wigner functions I think it would be nice to use a diverging colorscale ( plotly.colors.diverging ) to better indicate zeros and negativity etc. Some candiates are "RdBu", "RdYlBu" and "balance".

Implementation

No response

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

No response

@JacobHast JacobHast added the enhancement New feature or request label Jun 18, 2024
timmysilv added a commit that referenced this issue Aug 8, 2024
**Context:**
Now that the visualization improvements have been added to MrMustard,
there's some feedback that needs addressing. This PR does that.

**Description of the Change:**
- Change the default colour scheme in the 2D/3D Wigner plots from
`viridis` to `RdBu` to distinguish from the density matrix plot as
suggested in #418. I definitely agree with the choice - negative is red,
zero is white, and positive is blue. Felt semi-intuitive. If you'd
prefer another one from [plotly's
list](https://plotly.com/python/builtin-colorscales/), lmk!
- Force the mid-point of the colour axis in those Wigner plots to always
be 0 instead of auto-scaling, and show the scale
- Change the widget in the Fock repr to be kinda-square
- Change the 2D Fock magnitude plot to be a bar graph

**Benefits:**
- Things look more how we want them to
- Wigner color scale is consistent between plots to avoid confusion, and
scale is shown now
- Fock magnitude plot no longer falsely suggest that it represents
continuous information

**Possible Drawbacks:**
- Maybe you don't like RdBu?
- Maybe you'd prefer the colour scale to be hidden like before?

**Related GitHub Issues:**
Fixes #417, Fixes #418

---------

Co-authored-by: Filippo Miatto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants