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

Add Wigner plotting via CairoMakie #292

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LorenzoFioroni
Copy link
Contributor

@LorenzoFioroni LorenzoFioroni commented Nov 9, 2024

Checklist

  • Please read Contributor Covenant Code of Conduct
  • Any code changes were done in a way that does not break public API
  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in docs/ folder) related to code changes were updated and able to build locally by running make docs.

Description

This PR introduces plotting capabilities in QuantumToolbox (starting from the plot_wigner function implemented in QuTip).
To reduce the impact on loading time, I wrote an extension for the CairoMakie library, such that the necessary code is not loaded by default. Moreover, this allows extending the scheme to additional plotting libraries like PyPlot or Plots (although I haven't done it).

The plot_wigner function implements 2D and 3D projections of the Wigner and reproduces QuTip's output as faithfully as possible.

Related issues or PRs

fix #86

@ytdHuang
Copy link
Member

By the way, is it also possible to generate our logo with this function ?
I mean following the tutorial here: https://qutip.org/QuantumToolbox.jl/stable/tutorials/logo

@albertomercurio
Copy link
Member

I would say yes. Indeed, it would be a good thing to apply this function directly in the tutorial of the logo.

@LorenzoFioroni
Copy link
Contributor Author

It is straightforward to use this function to follow the logo tutorial up to where dissipation is included ("Introducing some decoherence"). However, I don't see an easy way to generate the full logo with the three julia colors, as that's not an heatmap anymore. In the tutorial you manually combine the colors to have a grid of RGB values displayed with image!.

Ideally, I would now add documentation and tests and fix a couple of minor details before pushing a new version. If you have any advice on how follow the tutorial till the end, though, I'd be happy to implement it.

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

Successfully merging this pull request may close these issues.

Plot wigner
3 participants