[unitaryhack] QNodes no longer display readable info when printed
See original GitHub issueThis issue has been tagged for contributions during unitaryHACK
The QNode currently does not display useful information when printed out:
>>> qnode
<pennylane.qnode.QNode at 0x7f4e29173d00>
We should add __str__
and __repr__
methods to the class to facilitate usage and debugging.
The __str__
method needs to be easily human-readable, while the __repr__
method should be more comprehensive.
Both methods should at least convey the qnode’s:
diff_method
interface
device.short_name
device.num_wires
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
PennyLane is a cross-platform Python library for differentiable ...
[unitaryHACK] Create a Pytorch simulator #1225 ... QNodes now display readable information when in interactive environments or when printed.
Read more >PennyLane is a cross-platform Python library for quantum ...
PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@josh146 Gotcha. Thanks for the explanation! I’ll make the changes accordingly in the PR. 😃
Fixed in
be3c88d
.