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 qml.numpy from np to pnp #6723

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Rename qml.numpy from np to pnp #6723

wants to merge 3 commits into from

Conversation

JerryChen97
Copy link
Contributor

Context:
Too many places where we import pennylane.numpy as np or from pennylane import numpy as np, which is very confusing and conflicting with common import numpy as np. The standard is either pnp (prefered), qnp or anp.

Description of the Change:
Change most of np to pnp. In one file there's npp also changed to pnp

Benefits:
Less confusion. More standardization.

Possible Drawbacks:
How do we deal with docstr and docs?

Related GitHub Issues:

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@ff3c1f9). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6723   +/-   ##
=========================================
  Coverage          ?   99.62%           
=========================================
  Files             ?      474           
  Lines             ?    44628           
  Branches          ?        0           
=========================================
  Hits              ?    44459           
  Misses            ?      169           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josh146
Copy link
Member

josh146 commented Dec 16, 2024

How do we deal with docstr and docs?

For docstring and docs, we have a long standing convention of

from pennylane import numpy as np

and this is what almost all users use.

For now, let's leave user facing docs in this form -- we can re-evaluate when we push on removing autograd.

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.

2 participants