-
Notifications
You must be signed in to change notification settings - Fork 23
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
improve visualizations in lab_dev #425
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #425 +/- ##
===========================================
+ Coverage 88.15% 88.31% +0.16%
===========================================
Files 80 82 +2
Lines 6542 6669 +127
===========================================
+ Hits 5767 5890 +123
- Misses 775 779 +4
Continue to review full report in Codecov by Sentry.
|
# Conflicts: # mrmustard/lab_dev/circuit_components.py # mrmustard/lab_dev/states/base.py # mrmustard/physics/representations.py # tests/test_lab_dev/test_states/test_states_base.py
# Conflicts: # mrmustard/lab_dev/assets/wires.txt # mrmustard/lab_dev/states/assets/states.txt # mrmustard/physics/assets/bargmann.txt # mrmustard/physics/assets/fock.txt # poetry.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice! thanks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Context:
There have been some issues with visualizations in MrMustard, and this should address a good amount of them
Description of the Change:
_repr_html_
, and replace them with ipywidgets-based implementations with_ipython_display_
. I mainly did this because ipywidgets is easier to work with than raw HTML, and should be more portable (eg. jupyterlab vs VS Code). Also, the switch to_ipython_display_
allows for side-effects, and doesn't also print the default repr (unless I do it explicitly)return_fig=False
option forState.visualize_*()
methods by not converting to HTML manuallyBenefits:
Possible Drawbacks:
Related GitHub Issues:
Fixes #423