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

Rename circuit_drawer module to drawer #1949

Merged
merged 3 commits into from
Nov 30, 2021
Merged

Rename circuit_drawer module to drawer #1949

merged 3 commits into from
Nov 30, 2021

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Nov 29, 2021

circuit_drawer was the only module with an underscore in it, and the circuit part of the name is fairly redundant. What else would we be drawing in PennyLane?

So we are shortening the name to the equally informative drawer.

circuit_drawer contains only developer-facing code. Do we need to import drawer as circuit_drawer as well and raise a UserWarning about the old path?

@albi3ro albi3ro self-assigned this Nov 29, 2021
@albi3ro albi3ro requested a review from josh146 November 29, 2021 20:05
@codecov
Copy link

codecov bot commented Nov 29, 2021

Codecov Report

Merging #1949 (71530a8) into master (5d01713) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1949   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files         225      225           
  Lines       17167    17168    +1     
=======================================
+ Hits        16963    16964    +1     
  Misses        204      204           
Impacted Files Coverage Δ
pennylane/drawer/__init__.py 100.00% <ø> (ø)
pennylane/drawer/charsets.py 100.00% <ø> (ø)
pennylane/drawer/circuit_drawer.py 100.00% <ø> (ø)
pennylane/drawer/drawable_layers.py 100.00% <ø> (ø)
pennylane/drawer/grid.py 96.77% <ø> (ø)
pennylane/drawer/mpldrawer.py 98.38% <ø> (ø)
pennylane/drawer/representation_resolver.py 99.36% <ø> (ø)
pennylane/drawer/tape_mpl.py 100.00% <ø> (ø)
pennylane/drawer/utils.py 100.00% <ø> (ø)
pennylane/circuit_graph.py 93.88% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d01713...71530a8. Read the comment docs.

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @albi3ro!

circuit_drawer contains only developer-facing code. Do we need to import drawer as circuit_drawer as well and raise a UserWarning about the old path?

Probably not needed, since this module was not user facing.

doc/releases/changelog-dev.md Show resolved Hide resolved
Comment on lines +21 to +22
from pennylane.drawer import tape_mpl
from pennylane.wires import Wires
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this was changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While double-checking import paths, I saw qml was only used twice. At that number it's cleaner and more performant to just import directly what we need.

Co-authored-by: Josh Izaac <josh146@gmail.com>
@josh146 josh146 merged commit aa1d6c2 into master Nov 30, 2021
@josh146 josh146 deleted the drawer_module_rename branch November 30, 2021 11:04
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.

None yet

2 participants