-
Notifications
You must be signed in to change notification settings - Fork 1k
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 _repr_pretty_
to all results and devices classes
#682
Labels
area/visualization
complexity/medium
introduces/modifies 3-5 concepts, takes max up to a month for an advanced contributor
kind/feature-request
Describes new functionality
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
Comments
We don't have many implementations of this. It is probably most urgent for "heavy" objects since otherwise it uses repr. |
Here is a pass on object we should consider making sure we have this for
Some of these may already be done or covered by superclasses. |
dabacon
changed the title
Add
Add Apr 30, 2020
_repr_pretty_
to more classes_repr_pretty_
to all results and devices classes
I guess we also have guidance to use repr_pretty for Gates. So we should do a complete audit. |
balopat
added
area/visualization
complexity/medium
introduces/modifies 3-5 concepts, takes max up to a month for an advanced contributor
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
labels
Sep 25, 2020
CirqBot
pushed a commit
that referenced
this issue
Nov 11, 2021
Implements `_repr_pretty_` which pretty prints in iPython (jupyter notebooks) Addresses #682
There are now on results and on devices. |
rht
pushed a commit
to rht/Cirq
that referenced
this issue
May 1, 2023
Implements `_repr_pretty_` which pretty prints in iPython (jupyter notebooks) Addresses quantumlib#682
harry-phasecraft
pushed a commit
to PhaseCraft/Cirq
that referenced
this issue
Oct 31, 2024
Implements `_repr_pretty_` which pretty prints in iPython (jupyter notebooks) Addresses quantumlib#682
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/visualization
complexity/medium
introduces/modifies 3-5 concepts, takes max up to a month for an advanced contributor
kind/feature-request
Describes new functionality
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
This method is used preferentially over
repr
in Jupyter notebooks and in ipython:repr
is supposed to be unambiguous, so we often can't be too creative with it. In order to make the ipython experience smoother we should show coarser easier to read information.Circuit
works the way it should (pretty printing a circuit), but e.g.TrialResult
does not. Support is generally very easy, because our__str__
methods do the hard lifting:The text was updated successfully, but these errors were encountered: